fix: read both fileIndex/frameworkManifest shapes; conform demo fixture to spec 0.4.3#6
Merged
Merged
Conversation
…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.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
normalizeWorkspace()(MCP) andparseSnapshot()(extension) each handled only one of the two shapes the real@workspacejson/specschema and legacy callers use forgenerated.fileIndex(array of paths vs. object keyed by path) andgenerated.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 arrayframeworkManifestas a valid legacy record; the extension dropped an object-shapedfileIndexto empty.main, and any repo a judge runsagents-audit generateon emits the real 0.4.3 shapes — the exact shapes the published server was misreading.fixture/.agents/workspace.jsonwith the real, published[email protected] generate, re-splicing hand-authoredmanualevidence back onto the producer-ownedgenerated/agents/healthsections it emits. The fixture now validates against the packaged spec schema (ajv/validate()true), where it previously did not.Test plan
npm run verify(structure/typecheck/lint/build/89 tests/smoke) — ALL GREENtsc+node --test out/test/*.check.js— 82/82 passingnpm ci, watched both bug-tests go red without the fix@workspacejson/[email protected](ajv +validate())--verifymode still correctly stays atOBSERVED(never falsely promotes) for the fixture's unreproducible evidence command