8000 fix: refuse execution dispatches before the task contract exists by adeelahmad · Pull Request #9 · adeelahmad/aloop · GitHub
[go: up one dir, main page]

Skip to content

fix: refuse execution dispatches before the task contract exists - #9

Merged
adeelahmad merged 1 commit into
masterfrom
claude/project-thread-qerfr9
Oct 17, 2026
Merged

adeelahmad merged 1 commit into
masterfrom
claude/project-thread-qerfr9

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Before: the supervisor could dispatch a worker before writing its task contract. In e2e run 6 that happened to the structural reviewer, and its gate then blocked 25 times on a STORY_DIR the worker had no way to supply. Separately, a scaffold-symbols line with notes on it (ParseError (enum) @ src/lib.rs) was split into fake symbols such as (enum) and @, and each one was reported as "defined 0 times".

After: a new gate-dispatch (PreToolUse on Agent/Task) refuses a dispatch to an execution role unless the prompt's first line is TASK_ID: <id> and .agentic/state/tasks/<id>.env already exists. It only acts on the main session, and only in repos that have a .agentic/ folder. The scaffold gate now takes the first token on each line as the symbol and drops anything that isn't an identifier.

How: the new gate parses the hook payload. The symbol fix is an awk/grep filter in gate-scaffold-verify.

Evidence.

  • make ci is green locally.
  • scripts/test/dispatch.test.py has 6 checks, and conformance is at 37 checks; the 6 dispatch checks and the new scaffold case all failed before the fix.
  • e2e run 6, on master plus the agent-prompt change from feat: v0.11.0 — rename to aloop, first end-to-end live run, gate hardening #7: 11/11 checks in 11m10s for $0.65, the lowest cost yet. Sub-agent reads of the plugin's own source dropped from 30 to 2.

Generated by Claude Code

e2e run 6 (11/11, 11 min, $0.65): the supervisor dispatched the
structural reviewer before writing its contract, and its gate blocked 25
times on a STORY_DIR the worker could not supply. gate-dispatch
(PreToolUse Agent|Task) now refuses an execution-role dispatch without a
'TASK_ID: <id>' first line or before .agentic/state/tasks/<id>.env
exists. Also: annotated scaffold-symbols lines no longer split into fake
symbols. dispatch.test.py (6) and 1 conformance case (37 total) failed
before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QxyVf3NgwsgRyYpBgDDTC
@adeelahmad
adeelahmad merged commit d49d473 into master Oct 17, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0