Skip to content

[doc-master] Scope leak — do not fold prior-commit CHANGELOG drift into current commit #741

@akaszubski

Description

@akaszubski

Summary

doc-master folds prior-commit documentation drift into the current commit's CHANGELOG, creating false attribution. During the spektiv #951 pipeline (commit c196bfd31, 2026-04-10), doc-master detected that a prior commit (edaad0c0a, "Admin dashboard health checks fail across containers") was missing a CHANGELOG entry — and added it to the #951 commit. Git blame now incorrectly attributes that CHANGELOG bullet to #951.

Implementation Approach

Update agents/doc-master.md to add a scope boundary rule for CHANGELOG updates:

  1. Only write CHANGELOG entries for files in the current commit's diff. Before writing any CHANGELOG bullet, verify the described change traces back to a file in git diff --stat HEAD~1 (or the staged diff for uncommitted changes).

  2. When prior-commit drift is detected (a CHANGELOG gap from an older commit), doc-master MUST NOT fold it into the current commit. Instead:

    • Report it as a separate finding: DOC-DRIFT-FOUND (prior commit): [description] — belongs to commit [sha]
    • Recommend a standalone doc-fix commit: git commit --allow-empty -m "docs: add missing CHANGELOG entry for [sha]"
    • Or flag it for the coordinator to handle after the current pipeline completes
  3. Scope check heuristic: For each CHANGELOG bullet the doc-master is about to write, ask: "Is the feature/fix described in this bullet present in the current git diff --name-only?" If not, it belongs to a different commit.

Test Scenarios

  • doc-master scans CHANGELOG, finds gap from commit abc123 (3 days ago) → reports as DOC-DRIFT-FOUND (prior commit) finding, does NOT write it into the current commit's CHANGELOG section
  • doc-master scans CHANGELOG, finds gap for the current commit → writes CHANGELOG entry (correct behavior, unchanged)
  • doc-master scans CHANGELOG, finds two gaps: one current, one prior → writes only the current one, reports the prior one as a separate finding
  • doc-master runs after remediation → only includes changes from the current pipeline (remediated files are still "current commit" scope)

Acceptance Criteria

  • agents/doc-master.md includes a "CHANGELOG Scope Boundary" rule
  • doc-master only writes CHANGELOG entries for changes in the current commit's diff
  • Prior-commit drift is reported as a finding (not silently folded in)
  • The reported finding includes the prior commit SHA and a recommended fix command
  • No CHANGELOG entry in a commit attributes a change that belongs to a different commit

Origin

Observed during spektiv Issue #951 pipeline (2026-04-10). CIA finding F2. doc-master added "Admin dashboard health checks" (from edaad0c0a) into the #951 CHANGELOG section.

Related

Plugin Version: 3.48.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions