Skip to content

fix(source-control): harden PR lifecycle guards#206

Merged
kyle-sexton merged 2 commits into
mainfrom
agent/issue-73-source-control-hardening
Jul 16, 2026
Merged

fix(source-control): harden PR lifecycle guards#206
kyle-sexton merged 2 commits into
mainfrom
agent/issue-73-source-control-hardening

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Closes #73

Summary

  • require a branch-derived issue to be OPEN before emitting Closes #N
  • preserve merge-commit branch history during babysit integration and use a plain push after merges
  • stash dirty worktrees before reusing them for a new task branch
  • add focused evals for all three deferred review findings and bump source-control to 0.4.1

Why

The previous issue lookup treated any successful gh issue view as closable, the babysit snippet always rebased despite its merge-workflow rule, and worktree reuse could silently carry unrelated edits onto a new branch.

Current behavior was verified against the official GitHub CLI issue JSON reference and Git's current log, merge, rebase, status, and checkout documentation:

Validation

  • node scripts/validate-plugin-contracts.mjs
  • node scripts/generate-catalog.mjs --check
  • claude plugin validate plugins/source-control
  • git diff --check

The repository-wide shell-test runner was attempted, but its pre-existing babysit readiness suite exceeds the local 30-second per-test diagnostic timeout; no shell implementation changed in this PR.

@kyle-sexton
kyle-sexton marked this pull request as ready for review July 16, 2026 13:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ecee757224

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/source-control/skills/pull-request/reference/babysit.md Outdated
git merge without --no-edit can open an editor for the auto-generated
merge message in a TTY-backed session, blocking a scripted babysit loop
mid-merge instead of reaching the plain push.
@kyle-sexton
kyle-sexton merged commit a850a9e into main Jul 16, 2026
13 checks passed
@kyle-sexton
kyle-sexton deleted the agent/issue-73-source-control-hardening branch July 16, 2026 14:52
kyle-sexton added a commit that referenced this pull request Jul 16, 2026
Resolves two content conflicts from #206 landing on main concurrently:
- plugin.json: keep 0.5.0 (this branch's minor bump already supersedes
  main's 0.4.1 patch bump from the same 0.4.0 base).
- CHANGELOG.md: keep both entries, newest-first (0.5.0 above 0.4.1).
kyle-sexton added a commit that referenced this pull request Jul 21, 2026
…-check (#846)

## Summary

- Adds a report-only existence-before-accuracy pre-check to
`review:doc-drift-detector` — before classifying
Stale/Missing/Aspirational, ask whether a reader with repository search
could derive the page's content from the code itself; an admission
failure routes to a new **Deletion-candidate** category (recommend
relocate-then-delete, never auto-delete). Decisions, domain language,
thin navigation, and policy/wiring pages always pass admission.
- Adds the same whole-page admission pre-check to
`docs-hygiene:audit-noise` ahead of its five in-page NOISE shapes — a
FAIL skips the in-page tier table and recommends relocate-then-delete
instead.
- Both reuse the shipped `docs-hygiene:audit-derivability` rubric **by
reference** (namespaced skill invocation, optional — degrades to the
admission question standalone when that plugin is unavailable), per the
plugin-isolation convention already established in this repo
(`plugins/discovery/reference/artifact-protocol.md`: "must not import
sibling plugin internals or assume another plugin is installed").
- Ships as the operator-ACCEPTED **portable-baseline default**
(2026-07-19, decision-session batch 2); a consuming repo's own declared
documentation-existence convention overrides via
`re-anchor:follow-our-standards`'s resolution ladder (repo-declared
source → repo's own conventions → this portable baseline).
- Zero hard-coded references to `melodic-software/standards` (verified
via grep on the diff) — the hard constraint from the issue holds.
- Version bumps: `review` 0.14.8 → 0.14.9, `docs-hygiene` 0.8.0 → 0.8.1,
with CHANGELOG entries for both.

Closes #505

## Related

- #206 (`melodic-software/standards`) — the merged
documentation-existence convention this pre-check consumes.
- #770 — `/docs-hygiene:audit-derivability`, the standalone rubric this
PR reuses by reference; not closed by this PR.
- #440 (`outward_write_mode`) — non-binding here; both embeddings stay
report-only/read-only.
- #657 — batch paper-cut issue; two process observations from this
implementation session were filed as a comment there, not fixed in this
PR.

## Test plan

- [x] `skill-quality:check` on `audit-noise` — PASS, 0 errors, 1
pre-existing warning (no Gotchas surface, unrelated to this change)
- [x] Verified no hard-coded `melodic-software/standards` reference in
the diff
- [x] Verified `allowed-tools` semantics against
<https://code.claude.com/docs/en/skills> — it is a pre-approval list,
not a hard restriction, so the added pre-check can invoke
`Read`/`Grep`/`Skill` under normal permission handling even though
`audit-noise`'s frontmatter only pre-approves its detect script
- [x] Commit is locally signed (`git log --show-signature` confirms
"Good git signature")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

source-control: three deferred P2 review findings from PR #72 (round-10)

1 participant