Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#48 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, shell
Ambito
devtools, tooling

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:

  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.

Lingua principale
Shell
Stelle
16
Fork
6
Merge medio
6h 24m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DimitriGeelen/agentic-engineering-framework

Tutte le issue di DimitriGeelen/agentic-engineering-framework

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.