Skip to content

fix: read both fileIndex/frameworkManifest shapes; conform demo fixture to spec 0.4.3#6

Merged
qmarcelle merged 6 commits into
mainfrom
feature/release-npm-workflow
Jul 17, 2026
Merged

fix: read both fileIndex/frameworkManifest shapes; conform demo fixture to spec 0.4.3#6
qmarcelle merged 6 commits into
mainfrom
feature/release-npm-workflow

Conversation

@qmarcelle

Copy link
Copy Markdown
Contributor

Summary

  • normalizeWorkspace() (MCP) and parseSnapshot() (extension) each handled only one of the two shapes the real @workspacejson/spec schema and legacy callers use for generated.fileIndex (array of paths vs. object keyed by path) and generated.frameworkManifest (legacy {runtime,testRunner} record vs. the schema's array of detected frameworks). Each silently misread the shape it didn't handle — the MCP server cast an array frameworkManifest as a valid legacy record; the extension dropped an object-shaped fileIndex to empty.
  • This matters now because 0.1.5 (HAC-176) publishes from main, and any repo a judge runs agents-audit generate on emits the real 0.4.3 shapes — the exact shapes the published server was misreading.
  • Regenerated fixture/.agents/workspace.json with the real, published [email protected] generate, re-splicing hand-authored manual evidence back onto the producer-owned generated/agents/health sections it emits. The fixture now validates against the packaged spec schema (ajv/validate() true), where it previously did not.
  • Updated tests that asserted the old hand-shaped fixture content; added regression coverage for both shapes in both consumers.

Test plan

  • npm run verify (structure/typecheck/lint/build/89 tests/smoke) — ALL GREEN
  • Extension: tsc + node --test out/test/*.check.js — 82/82 passing
  • Adversarial review: PASS, verified from clean npm ci, watched both bug-tests go red without the fix
  • Fixture re-validated against real published @workspacejson/[email protected] (ajv + validate())
  • Confirmed --verify mode still correctly stays at OBSERVED (never falsely promotes) for the fixture's unreproducible evidence command

…re to real spec 0.4.3

MCP normalizeWorkspace() and the extension's parseSnapshot() each handled
only one of the two shapes the real @workspacejson/spec schema and legacy
callers use for generated.fileIndex (array of paths vs. object keyed by
path) and generated.frameworkManifest (legacy {runtime,testRunner} record
vs. the schema's array of detected frameworks). Each consumer silently
degraded on the shape it didn't handle: the MCP server treated an array
frameworkManifest as a valid legacy record, and the extension dropped an
object-shaped fileIndex to empty.

Regenerated fixture/.agents/workspace.json with the real, published
[email protected] generate, re-splicing the hand-authored manual evidence
back onto the producer-owned generated/agents/health sections it emits.
The fixture now validates against the packaged spec schema (ajv/validate()
true), where it previously did not.

Updated the tests that asserted the old hand-shaped fixture content.
Copilot AI review requested due to automatic review settings July 17, 2026 11:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qmarcelle
qmarcelle merged commit 2b08a5b into main Jul 17, 2026
2 checks passed
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