Harden vxd against the compose-gap class: Python integration gate + assembled-app mandate + requirement-completion gate#108
Merged
Conversation
…assembled-app endpoint tests
detectProjectKind returned projectUnknown for Python repos (pyproject.toml/
setup.py/setup.cfg/requirements.txt), so the post-merge integration build was a
silent no-op for every Python project — the literal reason pulsereview merged
with an unassembled composition root (/reviews + /digest 404 despite "merged").
- integration_build.go: recognise projectPython; extract pure integrationCommand(kind, repoDir).
Python runs `python3 -m pytest -q` only when a test suite ships (mirrors the
Node "build script must exist" skip).
- planner.go: ENGINEERING STANDARDS now mandate that endpoint/surface stories
carry an integration test booting the REAL app via its factory with NO
dependency overrides, asserting the route is registered at its spec path and
cross-endpoint shared state.
Tests: TestIntegrationBuild_DetectsPythonProject, TestIntegrationCommand_Python{RunsTestsWhenPresent,WithoutTestsSkips},
TestIntegrationCommand_GoAndNodeUnchanged, TestPlanner_PromptMandatesAssembledAppEndpointTests.
…sed mainline
Closes the caveat that vxd reported REQ_COMPLETED on code that does not compile.
Per-story QA runs in isolated worktrees and cannot see cross-story drift; the
composed mainline WAS verified but only advisorily — gaps were written to
.vxd-fix-gaps.md and logged, then REQ_COMPLETED fired regardless.
CompletionGate.Run (engine/completion_gate.go), wired in dispatchNextWave:
- Pull the composed mainline FIRST so verification sees the true merged tree.
- verify (real build + tests) -> green: emit REQ_COMPLETED.
- red: run up to qa.completion_fix_cycles (default 2) godmode fix-agent cycles
(edit + commit + push the reconciliation), pull, re-verify. First green ->
REQ_COMPLETED. Exhausted -> emit REQ_BLOCKED (new event; projects requirement
status "blocked"; resumable via `vxd resume --godmode`).
- Nil client / negative cycles -> hard gate (verify once, block on red, no
auto-fix): silent-complete-on-red is structurally impossible.
Config: qa.disable_completion_gate (default false = ON), qa.completion_fix_cycles.
Wired via Monitor.SetCompletionGate in resume.go.
Tests: completion_gate_test.go (scripted loop: green-first, red->green,
stays-red->block, nil->hard-gate, gaps-file; REAL go-build integration:
RealVerify_{Blocks,Passes}; emitRequirementOutcome->blocked vs real stores),
TestProject_ReqBlocked, TestCompletionFixCycles, TestResume_WiresCompletionGate.
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 the defect class where a requirement reaches
REQ_COMPLETEDwith green per-story unit tests but a broken assembled app (routes declared-but-unwired, dependency stubs never overridden, per-route stores). Surfaced live on pulsereview (a Python/FastAPI build that merged with 3 endpoints non-functional).Two commits, three layers
a38894d— post-merge integration build now covers Python + planner mandates assembled-app testsintegration_build.go:detectProjectKindrecognizes Python (pyproject.toml/setup.py/setup.cfg/requirements.txt). Before, Python returnedprojectUnknownso the post-merge integration build was a silent no-op for every Python project — literally why pulsereview merged unverified. Command selection extracted into pureintegrationCommand(kind, repoDir); Python runspython3 -m pytest -qwhen a test suite exists (mirrors the Node "build script must exist" skip).planner.go: ENGINEERING STANDARDS now mandate that endpoint/surface stories carry an integration test that boots the real app factory with no dependency overrides, asserts the route is registered at its spec path (not 404), and asserts cross-endpoint shared state.284ed02— requirement-completion gate blocksREQ_COMPLETEDon a red composed mainlinecompletion_gate.go:CompletionGate.Runruns indispatchNextWaveafter all stories merge — pulls the composed mainline first, then verify→auto-fix→re-verify up toqa.completion_fix_cycles(default 2) godmode cycles. EmitsREQ_COMPLETEDonly when green, else the newREQ_BLOCKEDevent (resumable viavxd resume --godmode). Previously the verification loop only wrote.vxd-fix-gaps.mdand firedREQ_COMPLETEDregardless — advisory, not gating.qa.disable_completion_gate(default false = ON).Verification
go buildclean;go test ./...— 31 packages pass;go vetclean;golangci-lint0 issues.go buildintegration).python3 -m pytest -q) exits 1 on the compose gap, while the repo's own 171-test suite (which uses dependency overrides) exits 0 — so the defect now fails the gate and dispatches an integration-fix story instead of merging green.NXD port pending.