Commit Graph
17 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 fad2076073 Clarify recorded compatibility decisions and review output 2026-10-08 20:26:57 +08:00
Yixiang Tu de4a771c72 Simplify same-version acknowledgements to explicit decisions 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
Dudu-0223 307332baee Merge master and preserve compatible subagent catalog evolution 2026-09-20 17:35:18 +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 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 c6e62ff971 fix(persistence): retain explicitly forbidden JSON fields
A reader can reject a property name while its type declares that property
as optional never. Dropping it from the extracted schema makes a future
optional JSON value look additive, although the existing reader refuses it.
The type history must retain that explicit prohibition.

Support the argument-free @persistenceReserved marker only on optional
properties whose values are never or undefined. Keep those properties as
optional primitive-never nodes, so later JSON values change an existing
field and require a version bump. Reject invalid placement, arguments,
repeated tags, required or JSON-valued declarations, and mapped uses that
violate the reservation. Keep every unmarked omission rule unchanged.

The classification regression failed before this change with an additive
optional-property result and now requires a type-change bump. All fifteen
focused reservation cases and all 210 tooling tests pass, including inherited
fields, misuse, and unmarked preservation. Host typecheck, scoped lint, and
pairing pass. Regeneration leaves the unannotated baseline catalog and
inventory byte-identical; all 61 roots still match their existing history.
No runtime property is activated in this tooling commit.
2026-09-18 19:05:32 +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 b08f6c421b docs(session): backfill and gate persistence format references 2026-09-13 12:08:07 +08:00
Tianyi Cui aea077ac75 docs(session): backfill alpha and RC persistence history 2026-09-12 18:52:17 +08:00
Tianyi Cui 70a3be6f20 test(session): protect persistence digests from harmless reordering 2026-09-12 12:52:25 +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