Skip to content

chore(contracts): CHAOS-5672 Re-derive the ACR contract mirror for the semantic reading disclosure - #73

Merged
chrisgeo merged 7 commits into
mainfrom
chore/5672-semantic-reading-mirror
Sep 13, 2026
Merged

chrisgeo merged 7 commits into
mainfrom
chore/5672-semantic-reading-mirror

Conversation

@chrisgeo

@chrisgeo chrisgeo commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Ticket: CHAOS-5672

TEST-EVIDENCE

Re-derives the ACR contract mirror so this workbench accepts, and renders, the optional semantic_reading disclosure the producer now serves. ACR sets it on a result-by-id read of a stored clarification whose check against its stored reading of the question could not run, because that reading could not be loaded. status is unavailable, and reason is semantic_state_absent or semantic_state_unreadable. On the prior pin the result schema is closed, so a by-id response carrying the field is a contract violation.

Branch chore/5672-semantic-reading-mirror on main e7f27cb, which carries the organization-scope mirror at ACR 74d8fc4c (tip b20e9ca2c18341dc8b548a86fabd839059e9bd70, signed). Every command below ran in this worktree after a real pnpm install --frozen-lockfile.

  • Mirrored-surface delta, measured. git diff --numstat 74d8fc4c 9e35fe94 over the ten mirrored ACR files:
24	0	contracts/jsonschema/v1/context_fabric_investigation_result.v1.schema.json

Only the result v1 schema changes: the one optional property.

  • Pin. SOURCE_COMMIT is ACR 9e35fe9405d70879ed41600f3e4f484aea6411b2, the producer change's squash commit on ACR main.
  • Sync. node scripts/sync-acr-contracts.mjs generate --allow-write --source <acr worktree parked on 9e35fe94> rc=0. check --source <that worktree> and check both print ACR contracts are current.
  • Quality steps, each binary's own exit code:
generate rc=0
sync-check rc=0
sync-check-source rc=0
tsc rc=0
eslint rc=0
prettier rc=0
vitest rc=0
corpus rc=0
next-build rc=0
  • vitest run:
      Tests  949 passed (949)
   Start at  20:01:29
   Duration  12.59s (transform 25.71s, setup 14.97s, import 43.51s, tests 38.81s, environment 65.76s)
  • next build tail:


○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand

Consumer pin. The new describe block in src/lib/acr/validate.test.ts checks:

  • both reasons validate at this pin;
  • a result without the field still validates;
  • the object stays closed: a wrong status, a wrong reason (including pre_semantic_state), a missing member, an extra key and a non-object are each rejected;
  • an executed repro deletes the property from a copy of this pin's own schema and shows that copy rejecting the disclosure, while it still accepts a document without it.

Rendering. SemanticReadingNotice renders a visible note in the clarification view when the field is present, with a reason-specific cause: the options could not be checked, and asking again starts a fresh investigation. DeterministicAnswerView.test.tsx asserts the note's visible text for each reason, and no note when the field is absent.

RISK-NOTES

  • Wording is the workbench's own. ACR sends a closed machine token here, not a sentence, so the note's prose is authored in this repo.
  • Pin is the producer's merge commit. The mirrored delta was measured against it, not against a branch tip that could still move.
  • Merge order. The organization-scope mirror and the producer change are both on their mains; this branch is the last of the four.

@linear-code

linear-code Bot commented Sep 13, 2026

Copy link
Copy Markdown

CHAOS-5672

@chrisgeo
chrisgeo force-pushed the chore/5672-semantic-reading-mirror branch from 1f9733a to e932383 Compare September 13, 2026 17:12
Base automatically changed from chore/5720-org-scope-basis-mirror to main September 13, 2026 17:31
@chrisgeo
chrisgeo force-pushed the chore/5672-semantic-reading-mirror branch from e932383 to e438e0c Compare September 13, 2026 17:37
@chrisgeo
chrisgeo merged commit 7a43d9a into main Sep 13, 2026
13 checks passed
@chrisgeo
chrisgeo deleted the chore/5672-semantic-reading-mirror branch September 13, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant