Repository navigation
Description
Filed by the domain:metadata PM seat. This is the follow-up the #7856 triage ruling explicitly deferred rather than rejected, and it is filed because the implementing session drafted it but could not file it (the objectstack-ai org does not have the Claude GitHub App connected, so dev containers are blocked from the GitHub API — see #7856's PR #7992). Filing it here so a drafted card does not evaporate; a "drafted" card with no number is not a filing.
Provenance and what is already settled
#7856 (landed as PR #7992, c7e7900) fixed the coherence half: canonicalize now honours toJSON exactly as JSON.stringify does, so canonicalize(x) === canonicalize(JSON.parse(JSON.stringify(x))) holds by construction and put().version === get().hash is true again.
The triage ruling on #7856 (comment 5263973459) chose option 2 (hash the serialized form) and was explicit about this card:
Option 1 (reject non-round-tripping specs at the door) is NOT rejected on the merits — it is a separate accept-set tightening with its own blast radius; if the dev's measurement of real spec corpora shows non-round-tripping values are rare-to-zero, file the option-1 tightening as its own follow-up card (contract-first, likely
domain:spec-adjacent for the authorable face) rather than riding it here.
That measurement was taken and it favours the tightening. #7992 hashed this repository's entire checked-in JSON corpus under both the old and new implementations: 1973 files, 0 hashes changed. The only positions that behave differently are those carrying a callable toJSON, and the corpus contains none.
The question this card decides
put() currently accepts a spec whose in-memory form does not round-trip through JSON. After #7992 the stored bytes and the returned version agree, so nothing is incoherent any more — but the author still gets silent lossiness: a Date they wrote is a string when read back, and a class instance is whatever its toJSON yields.
Should put() refuse such a spec, loudly, naming the offending key?
For: it matches the repo's contract-first posture ("declared = enforced"), and it is the hardest shape for an AI author to get silently wrong — the failure becomes a message at the door instead of a value that quietly changes type between write and read.
Against: it is an accept-set tightening, i.e. a breaking change for any caller that does this today. The corpus measurement bounds the blast radius for checked-in specs at zero, but it says nothing about specs constructed at runtime by consumers.
put() callers that build a spec in memory — plugins, migrations, tests, SysMetadataRepository writers — are the population this tightening would actually break, and they were not measured by #7992.
⚠️ Three open questions the drafting session flagged
Recorded as questions, not answers — this card does not pick:
- Where does the refusal live —
put()in each repository implementation, or the shared contract suite /hashSpeclayer that fix(metadata-core,metadata-fs): hash the serialized form, soput().versionidentifies the bytes actually stored (#7856) #7992 already unified? The latter is the natural chokepoint but changes the accept set for every implementation at once. - What is the error's shape — a declared error code (subject to
check:error-code-casing), or a thrown validation error? It must name the offending key path, not just the fact of the failure. - Is
Dategenuinely disallowed, or normalised? A blanket refusal oftoJSON-carrying values is simple but rejectsDate, which is the single most likely thing an author writes. An alternative is to refuse only values whosetoJSONis lossy in a way the reader cannot invert — which is harder to define and may not be worth it.
needs-user-decision, not a coin flip — the original card said so and it still applies.
Routing note
Filed domain:metadata because the mechanism lives in packages/metadata-core / packages/metadata-fs. domain:spec (#6017) — the triage ruling anticipated this ("likely domain:spec-adjacent for the authorable face"). Re-route rather than reaching across.
Precondition
⛔ Do not start before confirming #7992 (c7e7900) is on main — this card is meaningless without it, since the coherence bug would otherwise mask the accept-set question.
Activity
huangyiirene commentedon Aug 12, 2026
⛔ DESIGN EXIT —
pm:dispatched→needs-user-decision. Two rulings needed, and the second one is on me.The dev stopped rather than improvising, which is the correct outcome and what the brief asked for. Its two questions:
Its full report could not be posted (the GitHub API is still unreachable from these containers) and will be relayed when handed over. Recording the shape now so the decision is not blocked on the transcript.
I wrote this card. I framed option 1 as "not rejected on the merits, deferred with its own blast radius" — treating it as independent of the option-2 fix that landed as #7992 (
c7e7900). It is not independent, and the dev found the coupling I missed.#7992 made this true by construction:
and pinned it with a table-driven contract suite —
Dateat a key,Dateunder an array index, a class whosetoJSONyields a string, an object literal carrying its owntoJSON, nested cases — placed in the shared repository contract suite so everyMetadataRepositoryimplementation is held to it.⇒ Option 1 refuses, at the door, exactly the specs those pins are built from. Implement the tightening and the coherence guarantee still holds in principle but can no longer be exercised end-to-end, because no caller can construct a case that reaches it. The two options are in tension in a way this card asserted they were not.
That is a genuine architectural question and not mine to settle: is a guarantee that cannot be exercised worth keeping, and at what cost to the tests that currently prove it?
The two candidate readings, without a preference
canonicalizeunit level) or be reversed. The end-to-end coherence property becomes an invariant nothing tests, which is exactly the shape [finding] DEBT ledger counts in check-type-check-coverage.mjs drift silently — @objectstack/metadata-protocol records 28, actually reports 63 #5278-style ratchets exist to refuse elsewhere in this repo.Datewhose stored form differs from its in-memory form. The version now identifies the stored bytes either way, so nothing is incoherent; the remaining cost is silent lossiness for the author.⛔ I am not choosing. Both readings are defensible and the choice is about what the platform promises authors, not about the code.
Question (1) — also genuinely a ruling
§4.3 as filed: is
Dategenuinely disallowed, or normalised? The brief told the dev that if it found itself inventing a definition of "lossy", it should stop rather than invent one. It stopped. That was the instruction working as intended.Dateis the single most likely thing an author writes, so a blanket refusal oftoJSON-carrying values has a very different feel from a targeted one — and "targeted" requires a definition of lossiness that nobody has written down.Precondition still holds
#7992 (
c7e7900) is onmain, so the coherence half is landed and this card is genuinely about the accept set, not about the bug it fixed.Generated by Claude Code
hotlong commentedon Aug 12, 2026
Maintainer ruling — 2026-08-12 (live PM chat,
session_01GxKQfv3k8b6a2d2QrZU411; maintainer sam, verbatim: 「接受你的全部建议。」 accepting the decision-box analysis in full).needs-user-decision→pm:on-hold(decision made, and the answer is "not now").Ruling: do not tighten. This card is the explicit carve-out to the standing principle adopted in the same ruling for #7893 / #7529 / #8010 / #7912 ("if the platform cannot honour a declaration, refuse it at publish, name the key path, never answer 200"). That principle governs declarations the platform cannot honour; here #7992 already made hashing coherent (1973 checked-in JSON files, 0 hashes changed), so nothing is broken — and the rule on this side of the line is don't narrow the accept set without measured need.
Two supporting reasons, both from the dev's coupling finding: the tightening would make #7992's 20 end-to-end coherence pins unconstructible (a guarantee nothing can exercise is worth less than the pins), and the population it would actually break — runtime
put()callers in plugins, migrations, tests,SysMetadataRepositorywriters — has never been measured.Restart conditions (any one re-opens this as a normal card): a measured incident where a silent type change between write and read (e.g. a
Datereading back as a string) causes a real defect; or someone measures the runtimeput()caller population and finds the blast radius small; or the residual lossiness starts producing support traffic. ⛔ Not a candidate for opportunistic pickup — it needs measurement first, not appetite.Generated by Claude Code
objectstack-fleet commentedon Sep 27, 2026
Closed
not_planned: the maintainer ruled 「do not tighten」 on 2026-08-12, so this card is a decision already made, not a deferralTriage seat (objectstack-wide, seat post #6015) ·
session_01W89enF2dYV7K4N2Fbfj33f· 2026-09-27T16:01Z. ⛔ Not a claim, ⛔ not a dispatch.Provenance: who — the maintainer; verbatim — 「同意」, answering the triage seat's on-hold cleanup plan (which named this card and this disposition); where — the maintainer's chat with the triage session
session_01W89enF2dYV7K4N2Fbfj33f, 2026-09-27.5271020238(maintainer 「接受你的全部建议。」) reads: 「do not tighten. This card is the explicit carve-out to the standing principle」. That is a "no", but it has sat aspm:on-holdwith noRestart-when:in either channel, read by every sweep.put().versionidentifies the bytes actually stored (#7856) #7992 already made hashing coherent (canonicalizehonourstoJSON), so a non-round-tripping spec no longer breaks coherence.Reopen is free on one reading: a spec that does not round-trip through JSON is measured reaching
put()and producing a wrong or incoherent stored result. Name the card or run.docs(agents): a claim pre-check hit is a hint, not a claim (objectsta…