fix(pchronicle): harden Storyline resource boundaries and retention - #78
Draft
reiase wants to merge 39 commits into
Draft
fix(pchronicle): harden Storyline resource boundaries and retention#78reiase wants to merge 39 commits into
reiase wants to merge 39 commits into
Conversation
# Conflicts: # crates/persisting-gateway/src/engine/tests/markdown_stream.rs # crates/persisting-gateway/src/engine/tests/replay_dedup.rs # crates/persisting-gateway/src/projection/frontmatter.rs # crates/persisting-gateway/src/projection/pipeline.rs # crates/persisting-gateway/tests/agenticmd_bridge.rs # crates/persisting-gateway/tests/agenticmd_golden.rs # crates/persisting-gateway/tests/markdown_trajectory.rs # crates/persisting-pchronicle-cli/src/exchange.rs # crates/persisting-pchronicle-cli/src/lib.rs # crates/persisting-pchronicle/Cargo.toml # crates/persisting-pchronicle/benches/json_streaming.rs # crates/persisting-pchronicle/benches/lance_vs_json.rs # crates/persisting-pchronicle/benches/pchronicle_criterion.rs # crates/persisting-pchronicle/benches/projection_pipeline.rs # crates/persisting-pchronicle/src/agenticmd/codec.rs # crates/persisting-pchronicle/src/agenticmd/convert.rs # crates/persisting-pchronicle/src/agenticmd/mod.rs # crates/persisting-pchronicle/src/agenticmd/projection.rs # crates/persisting-pchronicle/src/atif.rs # crates/persisting-pchronicle/src/convert/actf.rs # crates/persisting-pchronicle/src/convert/atif.rs # crates/persisting-pchronicle/src/convert/events.rs # crates/persisting-pchronicle/src/convert/mod.rs # crates/persisting-pchronicle/src/convert/openai_msg.rs # crates/persisting-pchronicle/src/document.rs # crates/persisting-pchronicle/src/format.rs # crates/persisting-pchronicle/src/formats/mod.rs # crates/persisting-pchronicle/src/formats/openai_corpus.rs # crates/persisting-pchronicle/src/formats/storyline.rs # crates/persisting-pchronicle/src/lib.rs # crates/persisting-pchronicle/src/model.rs # crates/persisting-pchronicle/src/projection/mod.rs # crates/persisting-pchronicle/src/query.rs # crates/persisting-pchronicle/src/storage.rs # crates/persisting-pchronicle/src/store/catalog/tests.rs # crates/persisting-pchronicle/src/store/document_source.rs # crates/persisting-pchronicle/src/store/files/atif_reader.rs # crates/persisting-pchronicle/src/store/files/mod.rs # crates/persisting-pchronicle/src/store/local_query_manifest.rs # crates/persisting-pchronicle/src/store/mod.rs # crates/persisting-pchronicle/src/store/storyline/model.rs # crates/persisting-pchronicle/src/store/storyline/rows.rs # crates/persisting-pchronicle/src/store/storyline/tests.rs # crates/persisting-pchronicle/src/tests.rs # crates/persisting-pchronicle/tests/atif_lance_corpus.rs # crates/persisting-pchronicle/tests/capture_fixture_corpus.rs # crates/persisting-pchronicle/tests/direct_file_query.rs # crates/persisting-pchronicle/tests/document_source.rs # crates/persisting-pchronicle/tests/import_roundtrip_fixtures.rs # crates/persisting-pchronicle/tests/public_api.rs # crates/persisting-pchronicle/tests/query_engine.rs # crates/persisting-pchronicle/tests/s3_storage.rs # crates/persisting-pchronicle/tests/storyline_lance_roundtrip.rs # docs/superpowers/specs/2026-08-17-pchronicle-document-source-convergence-design.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
objects.lanceand prune only expired, non-current physical generationsWhy
Storyline's correctness boundaries were strong, but several resource costs grew monotonically with document size, import size, or store age. Large documents and imports had no configurable hard limits, offloaded object versions were not physically vacuumed, and rebuilt table generations were retained indefinitely. The object-store replacement path also lacked deterministic conflict coverage.
Impact
Existing callers keep the previous unbounded import behavior unless they opt into limits. Maintenance now reports and vacuums the content-object dataset, and the existing vacuum retention also governs expired physical generations while always preserving the current generation and malformed/foreign directories. Optimistic-CAS conflicts remain explicit and retryable from the latest snapshot.
Validation
cargo fmt --all -- --checkcargo test -p persisting-pchronicle --lib store::storyline::tests— 36 passedcargo test -p persisting-pchronicle --test atif_lance_corpus— 7 passedcargo test -p persisting-pchronicle --test s3_storage— 4 ignored as expectedcargo clippy -p persisting-pchronicle --all-targets -- -D warningsThe real S3/MinIO multiprocess contract is compiled and remains opt-in via
PCHRONICLE_S3_TEST_URI; it was not executed without credentials.