Repository navigation
test(workspace): run chant's reader conformance suite over behold's workspace reader (#468) - #482
Merged
Merged
Conversation
…orkspace reader (#468) Every workspace read (ls, graph --member, status) now goes through one module, src/workspace-reader.ts. A read is one chant call of the contract command, over a transport that never hands the reader the workspace's path. The document comes back as chant printed it, and any contract but 1 is refused whole. src/workspace-reader-conformance.test.ts runs @intentius/chant/workspace/conformance against that module in npm test, so in CI. Each read also runs behold's own parser over the document and fails when behold couldn't use it. A second test fails when any other module in src/ names a read-contract command to chant. No chant bump: the suite and these three commands are in 0.95.0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Closes #468
Every workspace read behold makes now goes through
src/workspace-reader.ts:lsfor the member list,graph --memberfor a chant or terraform member, andstatusfor the gates (#477). The reader runs one chant call per read, over a transport that never learns the workspace's path, hands back the document chant printed, and refuses any contract but 1. In behold the transport isrunChantRawfrom the workspace root, as before.src/workspace-reader-conformance.test.tsruns@intentius/chant/workspace/conformance(the vitest wrapper) against that module forls,graphandstatus. It runs innpm test, so in CI's unit test step. As in hud's adapter, each read also runs behold's own parser over the document (workspaceFromLs,memberIrFromGraphDocument,gatesFromStatus) and fails if behold couldn't use it. A second test fails if any module insrc/other than the reader names a read-contract command to chant.The parsers that took stdout text keep their text entry points for the existing tests and gained document entry points that the reads now use.
No chant bump. The suite, its fixture and these three commands are all in the 0.95.0 behold already depends on. The suite run adds about 7 s to
npm teston this machine.Left for later, so #468 may want reopening or a follow-up:
behold doctor --fixstill runschant workspace checkdirectly, as the validation step after its own write;Tests:
just checkpasses (118 files, 2200 tests, 6 skipped).🤖 Generated with Claude Code