Make ticket-040’s existing read-only workspace observer usable at the normal
pre-edit boundary without adding another policy implementation. Add one
explicit make preflight PREFLIGHT_EXPECTED_BRANCH=<branch> entry point that
builds the current checkout and invokes a dependency-free Node wrapper over
inspectWorkspace().
The command accepts an explicit expected branch and an optional already-local
full baseline ref, defaulting to refs/remotes/origin/main. It prints the
canonical t2c.workspace-preflight/v1 JSON report, returns success only for a
PASS verdict and returns a stable non-zero exit for BLOCKED. It never
fetches, stashes, checks out, resets, cleans or otherwise mutates Git state.
Makefile owns discoverability, build ordering and explicit variables.scripts/workspace-preflight.mjs owns only argument parsing, invocation,
JSON output and process exit mapping.src/services/workspace-preflight.ts remains the sole owner of Git,
governance, diagnostic and fingerprint semantics and is not modified.test/workflow-validation.test.ts verifies help, required branch input,
stable exit behavior and the non-mutating command boundary.integration because Makefile and scripts/** are shared
integration contracts.main@1d926eb1bc540ff25377c47bc7c22590f8579288.XS; at most three implementation files and one component.Makefile, scripts/workspace-preflight.mjs and
test/workflow-validation.test.ts.src/**, project.sh, governance policy, workflow, package
manifests, schemas, CLI/MCP/A2A/SDK, network access or Git mutation.PASS to exit 0 and BLOCKED to a documented non-zero
exit without changing report evidence.git diff --check pass without a network call or live LLM.human:founder, evidenced by the active approval session;
no user-* file was generated or edited.The Founder approved this exact command, scope and accepted base in the active
session with an explicit tak, authorizing the transition to EDIT.
Implementation was completed inside that boundary and independently validated
before protected merge.
PASS, active ticket-043 and only the expected ahead-only warning.make verify passed 391 tests (390 pass, one declared local JDK skip), and
make governance, make docker-smoke plus git diff --check passed without
a live LLM call.b405ae8 isolates that subprocess with
--no-print-directory; the exact hosted invocation now passes locally.CC=9, below the project limit of 15.87ce55cea08fdfab01dc1c81f8bed093d17d5912 using
openrouter/z-ai/glm-5.2 and published an attested report.ifuri-validator-agent[bot] for ticket-043 and
correlation ID todo2code-pr56-87ce55cea08f, using
openrouter/z-ai/glm-5.2; its semantic output remained advisory.87ce55c without administrative bypass as
main@4a7445a06e79248f162595272912f017a9b28708.