Software factory: validator runs that check zero files no longer pass#5199
Merged
jurgenwerk merged 2 commits intoJun 15, 2026
Merged
Conversation
…run_lint
The agent-facing run_* tools could report green without checking
anything: a whole-realm run that discovered zero files, modules,
instances, or tests returned status 'passed'. In the adjust flow's
green-baseline gate this produced a false green when the first
run_parse fired before the seeded files reached the realm. The
zero-coverage trap was instruction text only ('a zero-test run counts
as failed') with no enforcement anywhere.
Two mechanical fixes in the tool layer (factory-tool-builder):
- run_parse and run_lint now sync the workspace to the realm before
running, like run_tests / run_evaluate / run_instantiate already
did — the engines read realm files, so unsynced workspaces were
invisible to them.
- A whole-realm result that passed while checking zero
files/modules/instances/tests is rewritten to status 'error' with a
message telling the agent to re-run after the realm contains the
files. Single-file runs are exempt (an explicit path either resolves
or errors on its own). The validation pipeline's step semantics are
unchanged — bootstrap issues use the no-op validator and
implementation issues always have files by validation time.
The bootstrap-seed adjust instructions and the orchestrator operations
skill now state both behaviors, and the skill documents the
single-file run_parse footgun: a file importing same-realm siblings
can report cross-file resolution errors a whole-realm run does not,
so whole-realm parse is the source of truth.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens Software Factory validator semantics so that a “passed” validation result always implies real work was performed, preventing false-green baseline gates when the realm/workspace isn’t yet populated or indexed.
Changes:
- Rewrite whole-realm
run_*results frompassed→errorwhen they report zero checked files/modules/instances/tests (single-filepathruns are exempt). - Add workspace sync-before-run for
run_parseandrun_lint(bringing them in line with the other validators). - Update adjust-flow seed instructions + orchestrator operations skill docs, and add unit tests covering the new behaviors.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/software-factory/src/factory-tool-builder.ts | Adds vacuous-pass rewriting to error results; adds sync-before-run for run_parse and run_lint; updates tool descriptions accordingly. |
| packages/software-factory/tests/factory-tool-builder.test.ts | Adds unit tests for vacuous-pass rewriting and sync-before-engine ordering/failure surfacing. |
| packages/software-factory/src/factory-seed.ts | Updates adjust-seed instructions to reflect sync + zero-coverage-is-error behavior. |
| packages/software-factory/.agents/skills-orchestrator/software-factory-operations/SKILL.md | Updates ops skill docs to reflect validator sync behavior and zero-coverage semantics; documents the single-file run_parse caveat. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ll path-taking tools The vacuous-pass message no longer tells the agent to sync (the tool already did) and names the validated unit instead of always saying 'file'. The single-file exemption now has explicit tests for run_lint, run_evaluate, and run_instantiate alongside the existing run_parse one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
habdelra
approved these changes
Jun 12, 2026
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.
Fixes CS-11426.
A validator that says "pass" should mean "I looked at your code and it's fine." Before this fix, it could also mean "I found no code to look at" — and it said "pass" either way. So the agent would ask "is everything OK?" before its files had actually arrived on the realm, get a "pass" that checked nothing, and move on believing its work was verified when nothing was. Now that situation returns an error saying "there was nothing to check — re-run," instead of a fake green light.
Both footguns were observed in real adjust-flow runs: the first baseline
run_parsereturned{status: "passed", filesChecked: 0}because it ran before the seeded files reached the realm, and a single-filerun_parseon a component false-failed with cross-file resolution errors a whole-realm run contradicted.What
Vacuous passes are now errors (tool layer). A whole-realm
run_parse/run_lint/run_evaluate/run_instantiate/run_teststhat passed while checking zero files / modules / instances / tests is rewritten tostatus: "error"with a message telling the agent to re-run once the realm contains the files. Until now the zero-coverage rule existed only as instruction text ("a zero-test run counts as failed") with no enforcement anywhere. Single-file runs are exempt — an explicitpatheither resolves to one checked file or errors on its own.run_parseandrun_lintnow sync the workspace first, exactly like the other three validators already did. Their engines read realm files, so an unsynced workspace was invisible to them — that's the precise mechanism behind the observedfilesChecked: 0false green. With all five syncing, the seed sequence (copy → sync → validate) is enforced mechanically rather than by prose.Scope choice: the rewrite lives in the agent-facing tool wrappers, not the shared engines. The validation pipeline's step semantics ("no files returns passed", asserted by name in the step tests) are unchanged — bootstrap issues use the no-op validator and implementation issues always have files by validation time.
Docs: the bootstrap-seed adjust instructions and the orchestrator operations skill state both behaviors, and the skill now documents the single-file
run_parsefootgun (per the ticket's option b): files importing same-realm siblings can false-fail in isolation; whole-realm parse is the source of truth.Verification
factory-tool-builder.test.ts44/44 green.validation-pipeline.test.ts,issue-loop.test.ts,factory-brief.test.tsall green locally;ember-tsc, eslint, prettier clean.🤖 Generated with Claude Code