Skip to content

test(workspace): run chant's reader conformance suite over behold's workspace reader (#468) - #482

Merged
lex00 merged 1 commit into
mainfrom
feat/468-reader-conformance
Oct 8, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/468-reader-conformance

Conversation

@lex00

@lex00 lex00 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Closes #468

Every workspace read behold makes now goes through src/workspace-reader.ts: ls for the member list, graph --member for a chant or terraform member, and status for 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 is runChantRaw from the workspace root, as before.

src/workspace-reader-conformance.test.ts runs @intentius/chant/workspace/conformance (the vitest wrapper) against that module for ls, graph and status. It runs in npm 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 in src/ 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 test on this machine.

Left for later, so #468 may want reopening or a follow-up:

Tests: just check passes (118 files, 2200 tests, 6 skipped).

🤖 Generated with Claude Code

…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>
@lex00
lex00 merged commit 76db398 into main Oct 8, 2026
1 check 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.

Read and write only through chant, proven: reader conformance now, writer conformance when it ships

1 participant