Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Inception and focus-drift gates attribute a commit by parsing its message, never the staged diff

Abierto
#48 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
git, shell
Área
devtools, tooling

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:

  1. The agent had explicitly declined the --no-verify bypass minutes earlier, on
    governance grounds, and recorded that refusal. It then defeated the same gate by
    accident, through message attribution, without noticing.
  2. 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DimitriGeelen/agentic-engineering-framework

Todos los issues de DimitriGeelen/agentic-engineering-framework

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.