Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/source-control/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "source-control",
"version": "0.29.0",
"version": "0.29.1",
"description": "Git and GitHub delivery workflow: /commit (Conventional Commits + Co-Authored-By trailer via safe heredoc mechanics), /pull-request (prep, create, CI monitoring, review-comment triage, merge, CI-log fetch), /babysit-prs (self-pacing fleet loop — safe by default; opt-in worker/autopilot tiers add gate-checked merge and thread resolution behind a deterministic Python engine), /babysit-loop (the loop-lane merge lane: a standing or drain loop that invokes babysit-prs per cycle, configured through repo-scoped babysit_loop_* keys on the layered source-control.md seam, with merge authority human-only until the target repo's tracked config adopts the lane, a gate-proven C2-mechanical baseline once adopted, and merge-rung raises binding from the team-tracked layer only), /worktree (create, status, cleanup, audit for parallel-session isolation), /setup (check the effective commit-subject / PR-title convention merged across its config layers and the babysit-prs config, or apply — interview the repo and write the convention config to a chosen layer), and /resolve-conflicts (intent-first merge/rebase conflict resolution with a semantic-conflict sweep — never --abort). The commit-subject / PR-title convention is configurable via a source-control.md config written by a re-runnable setup skill, layered across a ~/.claude user-global file, the tracked team file, and a gitignored .claude/source-control.local.md personal overlay merged per key; Conventional Commits is the default when no convention is declared.",
"author": {
"name": "Melodic Software",
Expand Down
19 changes: 19 additions & 0 deletions plugins/source-control/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
All notable changes to the `source-control` plugin are documented here. Format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning.

## [0.29.1]

### Fixed

- **The guard contract's wrapper-denial table is now bound in both directions.** `WRAPPER_DENIED_FLAGS`
records the flags a `bin/` wrapper refuses before Python runs, and a check already proved every
*listed* flag is one a `bash-wrapper` refusal row invokes the wrapper to demonstrate. Nothing
proved the converse: a new refusal row could demonstrate a second refused flag while the table
stayed silent about it, leaving that flag spellable in a documented command — the table would be a
subset of the wrapper's behavior while reading as a statement of it. Every bash-wrapper refusal
row's named flag must now be covered by the table. A companion assertion pins the premise the
separate wrapper check rests on: the merge parser *does* register `--allow-unpinned-head`, which is
exactly why a CLI-only check cannot see the wrapper's refusal — if that stops holding, the two
checks have collapsed into one and the narrowing is no longer load-bearing. The reverse check also
requires each bash-wrapper row to name a `--flag` in `error_contains`: that field is a tuple of
asserted output substrings with no invariant that any of them is a flag, so an empty tuple — or an
option recorded without its leading dashes — would have passed vacuously, leaving exactly the
omission the check exists to catch.

## [0.29.0]

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,52 @@ def test_wrapper_denied_flags_are_proven_by_a_refusal_row(self) -> None:
" bash-wrapper refusal row invoking it",
)

def test_every_wrapper_refusal_row_reaches_the_denial_table(self) -> None:
# The other direction of the same binding. The check above proves every
# LISTED flag is refused; without this one a new bash-wrapper refusal row
# could prove a second refused flag while the table stayed silent, and a
# document could then spell that flag unchallenged -- the table would be
# a subset of the wrapper's behavior while reading as its statement.
for row in contract.REFUSALS:
if row.refused_by != contract.BASH_WRAPPER:
continue
# `error_contains`, not `argv`: a row's argv also carries the flags
# that reached the wrapper legitimately, while the error names the
# one the refusal is about.
flags = [token for token in row.error_contains if token.startswith("--")]
# `error_contains` is a tuple of asserted output substrings with no
# invariant that any of them is a flag, so a row with an empty tuple
# -- or one naming its rejected option without the leading dashes --
# would yield nothing and pass this check vacuously, leaving exactly
# the omission it exists to catch. A wrapper refusal is ABOUT a flag;
# a row that cannot name one cannot be bound, so demand it here.
self.assertTrue(
flags,
f"`{row.id}` is a bash-wrapper refusal whose error_contains names"
" no `--flag`, so nothing binds it to WRAPPER_DENIED_FLAGS; name"
" the refused option in error_contains",
)
for flag in flags:
with self.subTest(row=row.id, flag=flag):
self.assertTrue(
contract.wrapper_denies(row.entry_point, flag),
f"`{row.id}` proves {row.entry_point} refuses `{flag}`, but"
" WRAPPER_DENIED_FLAGS does not cover it, so a documented"
" command may still spell it",
)

def test_the_denied_flag_is_one_its_own_cli_accepts(self) -> None:
# The premise the separate wrapper check rests on. The merge parser
# registers the flag the wrapper exists to remove, which is exactly why a
# CLI-only check cannot see the refusal. If this stops holding, the two
# checks have collapsed into one and the narrowing is no longer
# load-bearing -- the wrapper row would need re-deriving, not renaming.
self.assertIn("--allow-unpinned-head", self._accepted_flags(contract.MERGE_CLI))
self.assertTrue(
contract.wrapper_denies(contract.MERGE_WRAPPER, "--allow-unpinned-head")
)
self.assertFalse(contract.wrapper_denies(contract.MERGE_WRAPPER, "--merge"))

def test_every_doc_naming_a_wrapper_is_covered(self) -> None:
# A second document growing its own copy of a command line must be added
# to DOC_COMMAND_SOURCES, not left unchecked.
Expand Down