[Bug] Executor never calls guard.validate() — SDD compliance checking never runs on the real execution path
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 119
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Summary
HallucinationGuard.validate() is the guard's integrated entry point and the
only place the sddCompliance check runs. The executor never calls it — it
only calls validateFilePath() and validateCode() individually. As a result
SDD compliance validation never executes on the real execution path.
Verification on develop:
$ git grep -n "guard\.validate(\|hallucinationGuard\.validate("
packages/hallucination-guard/src/guard.test.ts:177
packages/hallucination-guard/src/guard.test.ts:197
validate() has zero production callers; both hits are its own unit test.
Meanwhile guard.ts gates the four checks like this:
enabledChecks.fileExistence/importValidity/syntaxValidity/
sddCompliance— all insidevalidate()validateFilePath()andvalidateCode()re-implement only the first three
So an SDD config can be loaded, parsed, and handed to the guard, and still never
influence a single validation decision at runtime.
This is the residual of #386. PR #392 correctly made validateFilePath /
validateCode honour enabledChecks, but that does not reach sddCompliance,
because that check does not exist on those two paths at all.
Reproduction
- Configure a project with a valid
sdd.yamlcontaining a constraint that
generated code would violate. - Run any
create_filetask through the executor. - Observe that no SDD compliance validation result is ever produced — the
executor'svalidateBeforeExecution/validateAfterExecutiononly ever
invokevalidateFilePathandvalidateCode. git grep "guard.validate("confirms no production caller exists.
Affected Area
executor, hallucination-guard, SDD
Environment
- OS: macOS (Darwin 25.4.0)
- Node: v24.18.0
- pnpm: 9.0.0
- FrontAgent:
develop@ db42301 (v2.2.0) - Host: CLI
Logs Or Screenshots
Relevant call sites in packages/core/src/executor/executor.ts:
validateBeforeExecution → this.config.hallucinationGuard.validateFilePath(...);
validateAfterExecution → this.config.hallucinationGuard.validateCode(...).
Neither reaches validate().
Found while fixing #387/#388 in PR #402; deliberately left out of that PR to
keep the diff focused.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/core/src/executor/executor.ts at validateBeforeExecution and validateAfterExecution, then read packages/hallucination-guard/src/guard.ts and the existing cases in packages/hallucination-guard/src/guard.test.ts. Trace how the executor should reach the integrated validation path without losing the existing file-path and code checks. Done means an execution with SDD constraints produces a compliance validation result, with tests covering the real path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100