Inception and focus-drift gates attribute a commit by parsing its message, never the staged diff
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
Start with agents/git/lib/hooks.sh:198-211 and agents/context/check-active-task.sh:80-103, then inspect the existing tests for both gates. Trace how each currently attributes a commit and how staged paths could be checked with git diff --cached --name-status. Done means both gates account for relevant staged task paths while preserving the legitimate bookkeeping workflow, with tests covering the reported cross-task case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Two independent gates decide which task a commit belongs to by parsing the commit
message or command text. Neither looks at what the commit actually stages. The result is
that a commit naming task A can carry task B's files straight through both gates — with no
bypass flag, no Tier-0 prompt, and nothing in the bypass log.
This is not hypothetical. It happened, and it was self-reported by the agent it happened to.
The two code paths
1. Inception exploration-commit gate — agents/git/lib/hooks.sh:198-211
_count_inception_exploration_commits() selects a task's commits with
git log --oneline | grep -E "^[0-9a-f]+ ${task_ref}:"
a commit-subject prefix match. A commit whose subject names any other task is invisible
to this gate regardless of which files it carries.
2. Focus-Target Drift gate (T-1730) — agents/context/check-active-task.sh:80-103
_fw_extract_drift_target() is documented in its own header as reading "only $1" — the
command or message text — "no focus, no filesystem."
The measured instance
Commit 7c67a60 in a downstream project, subject T-1045: G-052 refusal was a true positive..., carries:
.tasks/.../T-1047-*.md(+39 lines — four inception Open-Question dispositions)docs/sovereign-questions.md(+43 lines — a new Sovereign question, SQ-7)
Neither path is mentioned anywhere in the 30-line commit body. T-1047 was an inception
with 2 exploration commits and no recorded decision, so its gate was actively blocking
further T-1047-attributed commits at that moment. The content went through anyway.
Two things make this worse than an ordinary near-miss:
- The agent had explicitly declined the
--no-verifybypass minutes earlier, on
governance grounds, and recorded that refusal. It then defeated the same gate by
accident, through message attribution, without noticing. - The same mechanism is the only route that exists for a legitimate case: a prior
session leaves a completed task's bookkeeping staged, and the Focus-Target Drift gate
offers no non-bypass path to commit it. In practice it gets committed by attributing it
to whatever task is focused — i.e. the sanctioned workaround for one problem is the
exploit for the other.
Why it matters
Both gates are auditing intent as stated rather than effect as staged. For a gate
whose entire purpose is traceability, the stated intent is the one input an agent controls
freely and the staged diff is the one it cannot fake.
Suggested fix
Have both gates additionally inspect git diff --cached --name-status and treat a staged
path under a task's own tree (.tasks/**/T-XXXX-*.md, and for the inception gate the
inception's own artefacts) as naming that task, independently of the message. The signal
is already available at the moment each gate runs; neither consults it.
Filed from project 1409-sprind under T-1133 (observation-inbox triage), consolidating
two independently captured observations (OBS-018, OBS-021) that turned out to be one
defect seen from two sides.
- Lingua principale
- Shell
- Stelle
- 16
- Fork
- 6
- Merge medio
- 6h 24m
- PR unite (30g)
- 5
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DimitriGeelen/agentic-engineering-framework
-
area:cli bug severity:low status:fixed-on-bleeding-edge triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DimitriGeelen/agentic-engineering-framework#100 · 5 commenti ·
-
area:cli bug severity:medium status:fixed-on-bleeding-edge triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DimitriGeelen/agentic-engineering-framework#97 · 5 commenti ·
-
area:context bug severity:low status:fixed-on-bleeding-edge triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DimitriGeelen/agentic-engineering-framework#96 · 5 commenti ·
-
area:docs bug severity:medium status:in-progress triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DimitriGeelen/agentic-engineering-framework#95 · 4 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
Tutte le issue di DimitriGeelen/agentic-engineering-framework
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
level/task type/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
wazuh/wazuh-installation-assistant#1177 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
ComputeCanada/puppet-magic_castle#634 ·
I maintainer di solito rispondono entro 1 giorno
-
source:reader type:enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
stephrobert/blog-roadmap#115 ·
-
area/cli bug priority/p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno