Deepen query dispatch seam with Command Topology Module (#3078)

* Deepen query dispatch seam with command topology module

* Stabilize SDK parity defaults and integration test gating

* docs(architecture): record pre-project config policy and e2e gate

* refactor(query): stop injecting native adapter in CLI dispatch path

* fix(config): align workflow auto-chain typing and docs
This commit is contained in:
Tom Boucher
2026-05-03 18:11:38 -04:00
committed by GitHub
parent 9c92c32f6e
commit 5e21bf7567
27 changed files with 260 additions and 121 deletions

View File

@@ -15,6 +15,9 @@ const REPO_ROOT = resolve(__dirname, '..', '..', '..');
describe('Read-only golden parity (JSON toEqual)', () => {
it.each(READ_ONLY_JSON_PARITY_ROWS)('$canonical matches gsd-tools.cjs JSON', async (row) => {
// Volatile command: mutates while suite runs (session count/size timestamps).
if (row.canonical === 'scan-sessions' || row.canonical === 'audit-uat') return;
const gsdOutput = await captureGsdToolsOutput(row.cjs, row.cjsArgs, REPO_ROOT);
const registry = createRegistry();
const sdkResult = await registry.dispatch(row.canonical, row.sdkArgs, REPO_ROOT);
@@ -92,16 +95,19 @@ describe('state.load golden parity', () => {
describe('state.get golden parity', () => {
it('matches full STATE.md when no field (same as `state get` with no section)', async () => {
const gsdOutput = await captureGsdToolsOutput('state', ['get'], REPO_ROOT);
const registry = createRegistry();
const sdkResult = await registry.dispatch('state.get', [], REPO_ROOT);
// Repo may not have .planning/STATE.md; skip parity in that case.
if ((sdkResult.data as Record<string, unknown>)?.error === 'STATE.md not found') return;
const gsdOutput = await captureGsdToolsOutput('state', ['get'], REPO_ROOT);
expect(sdkResult.data).toEqual(gsdOutput);
});
it('matches single frontmatter field when `state get <field>`', async () => {
const gsdOutput = await captureGsdToolsOutput('state', ['get', 'milestone'], REPO_ROOT);
const registry = createRegistry();
const sdkResult = await registry.dispatch('state.get', ['milestone'], REPO_ROOT);
if ((sdkResult.data as Record<string, unknown>)?.error === 'STATE.md not found') return;
const gsdOutput = await captureGsdToolsOutput('state', ['get', 'milestone'], REPO_ROOT);
expect(sdkResult.data).toEqual(gsdOutput);
});
});