-
Notifications
You must be signed in to change notification settings - Fork 0
Track existing semgrep architecture-lint blockers in internal/cli #438
Copy link
Copy link
Open
Description
Summary
The repo's semgrep architecture-lint hook is currently blocked by pre-existing violations in internal/cli/, which prevents normal commits even when a change does not introduce any new boundary violations.
Current blockers seen from the hook output:
-
internal/cli/master_worker.gosemgrep.cli-no-daemon-import- CLI imports
internal/daemondirectly.
-
internal/cli/remote_control.gosemgrep.no-raw-exec-in-boundary-layers- raw
exec.Commandin a CLI boundary file. semgrep.cli-no-worktree-fs-check-incremental- direct
os.Statworktree checks in CLI. semgrep.cli-no-opencode-client- CLI constructs
agent.NewOpenCodeClient(...)directly. semgrep.cli-no-multiplexer-direct- CLI sends tmux/zellij keys directly.
Why this matters
These are existing baseline violations, but the pre-commit hook runs across the whole boundary layer:
commit -> semgrep hook -> existing findings in unrelated files -> commit blocked
That means:
- unrelated changes need
--no-verifyto land - architecture lint loses signal because developers get blocked by old debt instead of new regressions
- boundary rules in
AGENTS.md/ semgrep are harder to enforce incrementally
Desired outcome
Pick one of these approaches and make it explicit:
- Fix the existing violations in
master_worker.goandremote_control.go. - Move them behind daemon /
orchapiAPIs so CLI no longer crosses the boundary directly. - If immediate cleanup is too large, add a deliberate temporary baseline/allowlist strategy so the hook blocks only new violations until the debt is retired.
Acceptance criteria
make lintdoes not fail solely because of the knowninternal/cli/baseline violations.- Commits for unrelated changes do not require
--no-verify. - The long-term boundary remains: CLI should use daemon APIs rather than direct daemon/process/multiplexer/OpenCode/file-system operations.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels