Commit Graph
19 Commits
Author SHA1 Message Date
turtle1999 1edcd49192 refactor(scripts): key persistence schema nodes by subgraph digest
Store one node table keyed by the 16-hex digest prefix of each node's
canonical subgraph instead of per-root graphs with numeric indices, so a
type change rewrites only the changed nodes and their ancestors.

Refs #6597
2026-10-19 18:37:48 +08:00
Yixiang Tu de4a771c72 Simplify same-version acknowledgements to explicit decisions 2026-10-08 20:26:57 +08:00
Yixiang Tu b2a93b6307 Accept todo identifiers in persistence review evidence 2026-10-08 20:26:57 +08:00
Yixiang Tu 5c5b51257a Allow reviewed same-version Session schema changes 2026-10-08 20:26:57 +08:00
Tianyi Cui dd302f718b feat(session): catalogue experimental plugin records 2026-10-05 17:20:26 +08:00
Dudu-0223 a978ad1994 fix(subagent): version unknown catalog payloads locally 2026-09-20 15:09:37 +08:00
Dudu-0223 f984683956 fix(subagent): store unknown mode in the existing catalog event 2026-09-20 14:46:54 +08:00
Tianyi Cui 580bdc7258 refactor: remove redundant unknown casts 2026-09-19 20:13:58 +08:00
Tianyi Cui bd5b1cd44f test(session): keep persistence fixture inventory keys portable
The accepted-baseline tests inventory temporary files with keys produced by
the host path.join. On Windows those keys contain backslashes, but the status
lookup and acknowledgement-preservation filters use repository-style slash
paths. Windows coverage therefore reads undefined for the status assertion;
the filtered preservation loops also select no files on that platform.

Use posix.join for logical inventory keys while keeping native path.join for
filesystem access. All platforms now exercise the same status lookup and
preservation assertions. This is confined to the test helper and changes no
production admission rule, compatibility policy, schema, or recorded fixture.
2026-09-19 00:07:18 +08:00
Tianyi Cui 0112eaf3a8 feat(session): finalize the accepted V4 compatibility baseline
The integrated V3-to-V4 records contain the header increase that authorizes
their breaking changes. Leaving those terminal records editable would let a
later change reuse that already accepted 3-to-4 increase, so version 4 would
not establish a stable compatibility baseline for persisted user data.

Capture the accepted root classifications and semantic record digests in a
separate finalization checkpoint. Validate that checkpoint before rendering
or writing acknowledgement artifacts, and preserve its accepted records even
after the current writer advances. Keep publication evidence independent:
the verified released version remains 3 until a release establishes otherwise.

Compare future writer-4 schemas with the accepted baseline using the existing
compatibility classifier. Compatible additions remain permitted through new
same-version acknowledgement records. Breaking changes require a higher
writer and their own header transition; comments, aliases and source-location
changes do not alter the accepted semantics. Later unaccepted compatible
records retain the existing update workflow.

Document the distinction between finalization, publication and compatible
evolution, with regression coverage for locked records, incomplete or
inconsistent checkpoints, additive changes and future-version transitions.
2026-09-18 23:40:56 +08:00
Tianyi Cui b88afa8a72 fix(ptc): name persisted producer attribution ptc-mode
The producer-source refactor introduced the unreleased V4 discriminator
code-mode even though this source identifies images deferred from successful
PTC subcalls. Name it ptc-mode before V4 ships so persisted attribution
matches the producer and does not freeze obsolete terminology into new logs.

Keep the live writer, V3-to-V4 migration output, collision guard, and reserved
producer policy aligned. Both released tools-code-mode and tools-ptc plugin
lookup keys map to ptc-mode. Preserve those historical keys, opaque message
text and IDs, all frozen V0-to-V3 generations, and recorded Session inputs.

Update the owning tests, producer documentation, current catalog, and V4
acknowledgement. The canonical schema audit identifies exactly three changed
roots; reversing only the source literal restores each prior digest. The
large generated JSON diff comes from graph ordering, with 61 roots and 572
types retained.

Validation: the seven-file focused run passed 298 tests and exposed four
stale current-output expectations in two migration files. After correcting
those expectations, both files passed all 23 tests. All 41 documentation
gates and full lint passed; frozen generations and recorded inputs are
unchanged.
2026-09-18 19:07:12 +08:00
Tianyi Cui a6981c56f6 feat(persistence): add stable catalogs and policy-aware schema review
Traversal ordinals and first-owner paths gave shared persistence types
unstable display names. Keep authored names and source locations as metadata,
use structural digests for identity, and render complete kind/form groups
with bounded array labels. Preserve historical rendering and stored graphs.

Record supported source compatibility promises with their property binding,
policy version, discriminator, preservation rule, and qualified kind set.
The extractor and classifier require explicit opt-ins in both compared
schemas; ordinary or unsupported changes retain strict classification.
Policy-bearing graphs use the format-2 fingerprint domain while unannotated
graphs keep their format-1 fingerprints. Runtime owners activate bindings
only with the corresponding reader behavior; this tooling layer activates
none and changes no package source or Session generation.

Provide a read-only before/after review command that groups shared structural
evidence without replacing authoritative compatibility diagnostics. Match
changed alternatives only through unique literal discriminators and retain
ambiguous additions and removals as independent facts.

At the X baseline, all 61 roots and 472 schemas, digests, and source fields
are unchanged. The inventory remains format 1 and removes only 296 synthetic
names. Existing acknowledgement history still matches every root. All 195
focused tooling tests, Host build/full lint, and bilingual pairing pass.
2026-09-18 19:05:32 +08:00
Tianyi Cui 38070996c1 docs(session): nest historical formats under persistence changes 2026-09-13 12:19:46 +08:00
Tianyi Cui 765c87fb87 fix(docs): address persistence format history review 2026-09-13 12:08:08 +08:00
Tianyi Cui aea077ac75 docs(session): backfill alpha and RC persistence history 2026-09-12 18:52:17 +08:00
turtle1999 0b368dfe78 test(persistence): budget heavy integration cases for CI 2026-09-12 14:35:03 +08:00
Tianyi Cui 6e294b1c27 fix(session): infer persistence change decisions for agents 2026-09-11 23:56:06 +08:00
Tianyi Cui a0a7e2c11c fix(session): harden and automate persistence change review 2026-09-11 23:15:26 +08:00
Tianyi Cui 1e9b05d356 feat(session): verify persistence type history 2026-09-11 22:06:58 +08:00