Inception and focus-drift gates attribute a commit by parsing its message, never the staged diff
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Shell
- Estrellas
- 16
- Forks
- 6
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DimitriGeelen/agentic-engineering-framework
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Todos los issues de DimitriGeelen/agentic-engineering-framework
Issues similares
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 85/100
iceboundrock/fp-skills#36 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
open-horizon/devops#237 ·
-
bug detection-rule
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
blitzcrieg1/agentmetry#345 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
danilogiles/enki-browser#113 ·
Los mantenedores suelen responder en 1 día
-
agent/architect architecture stage/045-needs-decision tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
projectbluefin/actions#707 ·
Los mantenedores suelen responder en 1 día