ceilf6 / ceilf6/FrontAgent

[Bug] Executor never calls guard.validate() — SDD compliance checking never runs on the real execution path

Open
#404 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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 inside validate()
  • validateFilePath() and validateCode() 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

  1. Configure a project with a valid sdd.yaml containing a constraint that
    generated code would violate.
  2. Run any create_file task through the executor.
  3. Observe that no SDD compliance validation result is ever produced — the
    executor's validateBeforeExecution / validateAfterExecution only ever
    invoke validateFilePath and validateCode.
  4. 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:
validateBeforeExecutionthis.config.hallucinationGuard.validateFilePath(...);
validateAfterExecutionthis.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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.