Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#48 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git, shell
Lĩnh vực
devtools, tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Shell
Star
16
Fork
6
Merge trung bình
6 giờ 24 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DimitriGeelen/agentic-engineering-framework

Tất cả issue của DimitriGeelen/agentic-engineering-framework

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.