Skip to content

fix(conformance): distinguish Cave record mismatches - #165

Merged
BunsDev merged 6 commits into
mainfrom
fix/cave-record-diagnostics
Sep 9, 2026
Merged

fix(conformance): distinguish Cave record mismatches#165
BunsDev merged 6 commits into
mainfrom
fix/cave-record-diagnostics

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 9, 2026

Copy link
Copy Markdown
Member

Linux reaches evidence assembly but currently emits only phase1.stage.evidence-authority.build.cave-record. Report fixed identity-field, timing-bound, and assertion-condition IDs through both wrappers. Reject private diagnostic suffixes and expose no record values, assertion IDs, or private causes.

Also reject malformed/noncanonical Cave timestamps before range comparisons; review identified that null and numeric values could otherwise bypass the existing JavaScript comparisons. Identity checks, inclusive timing bounds, assertion requirements, frozen production sources, dependencies, and resource limits remain unchanged.

Update protected workflow hashes and the immutable authority graph. Use a real merge commit, not squash/rebase, so executable authority cd2f5a3 remains reachable. SDK rebinding and a protected run are required before identifying Linux's failing condition.

Validation: 17 red-to-green diagnostic regressions; evidence suite 41 passed / 42 existing optional SDK-fixture skips; TypeScript and Biome passed. Verified all 25 governed Git blobs/digests and 36 literal workflow source pins. Broad harness/lock run: 398 passed / 2 skipped, with one fixture-cleanup failure caused by an empty directory left by an interrupted run. The directory was removed; the failed test and three exact-authority regressions then passed on the final commit. No test or production timeouts were increased.

Copilot AI lite review requested due to automatic review settings September 9, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

validateCaveRecord currently compares ranAt without validating it is a canonical ISO timestamp string, allowing non-string/coerced values to bypass the new bounded timing checks.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR refines Phase 1 conformance diagnostics by splitting the previously coarse Cave record mismatch failure into specific, allowlisted diagnostic IDs, and updates the conformance lock / workflow pins to match the new immutable authority checkpoints.

Changes:

  • Split Cave record mismatch failures into bounded diagnostic IDs (identity / timing / assertions) and ensure wrapper allowlists include them.
  • Add a dedicated test suite to assert the new diagnostics propagate through both producer/public wrappers and reject private suffixes.
  • Update conformance lock authority hashes, workflow source pins, and documentation to reflect the new reachable checkpoints and diagnostic taxonomy.
File summaries
File Description
src/phase1-schema-v2-evidence.test.ts Adds tests asserting bounded Cave record diagnostics and wrapper behavior.
src/phase1-conformance-lock.test.ts Updates expected authority revision/tree/blob+sha256 pins.
scripts/phase1-schema-v2-producer.mjs Extends public diagnostic allowlist for schema-v2 producer wrapper.
scripts/phase1-schema-v2-evidence.mjs Implements the split Cave record validation diagnostics and exports validateCaveRecord.
scripts/phase1-schema-v2-evidence.d.mts Declares the new exported validateCaveRecord API.
scripts/phase1-conformance.mjs Extends public diagnostic allowlist for public wrapper.
phase1-conformance.lock.json Updates locked harness authority checkpoints.
docs/phase1-conformance.md Documents the new bounded Cave record diagnostics and updates pinned SHA-256 values.
.github/workflows/client-v1-conformance.yml Updates protected workflow source hash pins for conformance verification.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1174 to +1179
if (caveRecord.ranAt < expected.startedAt) {
throw new Error('phase1.stage.evidence-authority.build.cave-record.timing.before-run');
}
if (caveRecord.ranAt > expected.completedAt) {
throw new Error('phase1.stage.evidence-authority.build.cave-record.timing.after-run');
}
@BunsDev
BunsDev merged commit b2d63e5 into main Sep 9, 2026
9 checks passed
@BunsDev
BunsDev deleted the fix/cave-record-diagnostics branch September 9, 2026 22:49
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.

2 participants