Skip to content

feat(source-control): add the dossier_branch_prefix setting and name dossier branches in work-items:work - #12037

Closed
melodic-automation-lanes[bot] wants to merge 1 commit into
mainfrom
work-resolve-issue/issue-10149-41333586642-1
Closed

melodic-automation-lanes[bot] wants to merge 1 commit into
mainfrom
work-resolve-issue/issue-10149-41333586642-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #10149

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Adds the source-control setting dossier_branch_prefix, default dossier/, in the schema and in config-resolution.md's "YAML keys" section. That section states the branch shape dossier/<key>-<slug>, where <key> is the bound tracker adapter's branch_ref, and the one-dossier-per-owning-item rule. This repository's team layer sets dossier_branch_prefix: dossier/. /work-items:work's "Suggest branch name" step names the dossier branch and reads its prefix from the setting. parse-branch-issue.test.sh gains a dossier/42-auth-notes case. Following the recorded decision on the issue, the prefix is a team-level YAML key with a plugin default and no userConfig option, because the decision's done-when names only the schema, the reference and the team YAML. The pre-push secrets check and branch deletion on close are part 2 (#10150) and are not written here.

Not verified

  • parse-branch-issue.test.sh was not executed in this lane (Bash runs only the named wrappers). Its result is left to the PR's CI; the new case follows the same code path as the existing feat/42-new-rule case.
  • Tidy skipped: the change spans 3 areas (plugins/source-control, plugins/work-items, docs/conventions), above the 1-area cutoff, and touches the shared path docs/conventions/.
  • CI-only checks named by check-affected (convention-yaml-schema, typos, markdownlint and others) are left to the PR's CI.
  • Open design question from the review, outside this part's done-when: on GitHub, Gitea and local-markdown, the adapter's branch grammar also matches dossier/42-..., so a PR opened from a dossier branch would carry Closes #42. The parent says a dossier branch is pushed with no PR, so this change takes

Fix

  • plugins/source-control/schemas/source-control.schema.json: new string property dossier_branch_prefix, default dossier/, with its description.
  • plugins/source-control/reference/config-resolution.md: new "YAML keys" bullet for dossier_branch_prefix covering the default, the dossier/<key>-<slug> shape with <key> as the adapter's branch_ref, one dossier per owning item, resolution, the /work-items:work reader, and how the key
  • docs/conventions/source-control.yaml: sets dossier_branch_prefix: dossier/, with a comment line.
  • plugins/work-items/skills/work/SKILL.md: the "Suggest branch name" step names the dossier branch <prefix><key>-<slug> (default dossier/<key>-<slug>), reads <prefix> from dossier_branch_prefix, else dossier/, and states the one-dossier-per-owning-item rule.
  • plugins/source-control/skills/pull-request/scripts/parse-branch-issue.test.sh: new case that dossier/42-auth-notes emits 42 with exit 0.
  • .changes/source-control/work-resolve-issue-issue-10149-41333586642-1-62ec1a2c.md: minor fragment (Added) for the new setting and test case.
  • .changes/work-items/work-resolve-issue-issue-10149-41333586642-1-b0179841.md: patch fragment (Changed) for the work skill's dossier branch naming.

Verification

The runner ran each check from the base copy against 5f6b46e:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 4 fragments under .changes/ valid (run before and after the review fixes).
  • check-changed-skills: pull-request and work skills PASS, 0 errors (warnings are on pre-existing size and description limits; run before and after the review fixes).
  • check-affected: 12 passed, 6 skipped, the rest CI-only, over 7 changed files (run before and after the review fixes).
  • Grep -i dossier over the checkout (count mode, standing in for git grep -c -i dossier): lists config-resolution.md, source-control.schema.json, docs/conventions/source-control.yaml, work/SKILL.md, parse-branch-issue.test.sh and the two fragments; every file the done-when names is listed.
  • Read of parse-branch-issue.sh by the review subagent: with no config the built-in grammar ^[a-z]+/(routine-issue-)?([0-9]+)- (line 347) captures 42 from dossier/42-auth-notes, the same path as the existing feat/42-new-rule case.
  • Fresh-context review subagent over the whole diff: all done-when items hold. Two low findings were confirmed against create.md:174-180 and CONTRACT.md and fixed: the tracker-key parsing claim now separates the tracker-bound path (the adapter's grammar) from the unbound path, and /work-items:work now
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41333586642

Left out: the items under Not verified.

Related

#10149

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 5f6b46e2c5d7f9b1967b20f2ce9df8359a1a143a. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate holds it on its risk score (evidence-unbound:claude-review: not bound:
  rerun-not-allowed; evidence-unbound:claude-security-review: not bound: rerun-not-allowed)

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 5f6b46e2c5d7f9b1967b20f2ce9df8359a1a143a: read 7 of 7 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12037 (head 5f6b46e)

I found no security issues in this change.

I read every hunk of all 7 changed files. None of them match a trusted-path glob.

  • docs/conventions/source-control.yaml adds dossier_branch_prefix: dossier/. This is not pr-pipeline.yaml, and nothing in the token broker, lane slots or merge settings changes.
  • plugins/source-control/schemas/source-control.schema.json adds one new string property, dossier_branch_prefix (minLength: 1, default dossier/). Its only reader is the prose in /work-items:work, which uses it to name a branch. That step emits a git checkout -b command for the user to run and never runs it itself. No script reads the key. Its value comes from the repository's own team layer, so no untrusted input reaches it.
  • plugins/source-control/reference/config-resolution.md and plugins/work-items/skills/work/SKILL.md only add text. Nothing in them deletes, narrows or softens a standing instruction, so the instruction-surface lens has nothing to judge.
  • parse-branch-issue.test.sh adds one test case. It does not change the parser.
  • The two .changes/ fragments are changelog notes only.

This diff changes no trust control, merge hold, kill switch, token scope, plugin manifest or workflow. No plugin.json or marketplace.json changed, so there are no manifest lines to report.

The PR description says a PR opened from a dossier branch would carry Closes #N. That is a workflow design question, not a security finding.

I found no embedded instructions in the PR context. No prior findings exist, and the round cap did not apply.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 5f6b46e2c5d7f9b1967b20f2ce9df8359a1a143a: read 7 of 7 changed file(s); 2 finding(s), 0 as inline comments.

Code review: PR #12037

This PR adds the dossier_branch_prefix source-control setting: the schema entry, a bullet in config-resolution.md under "YAML keys", the team-layer value in docs/conventions/source-control.yaml, a sentence in /work-items:work's "Suggest branch name" step, a test case in parse-branch-issue.test.sh, and two changelog fragments. I read every hunk of all 7 changed files, plus the matching .claude/rules/ files, convention-key.sh and the loop-key reader in babysit_repo_config.py.

Readers of the new key. The team YAML's existing readers (convention-key.sh, babysit_repo_config.py) look up only their own keys, so the extra key doesn't break them. The schema has additionalProperties: false and now declares the property, so the team YAML still validates.

Closing issue #10149, checked against the recorded decision's done-when:

  • Schema and reference define dossier_branch_prefix, default dossier/, with the shape dossier/<key>-<slug> (<key> = adapter branch_ref) and the one-dossier-per-owning-item rule: met.
  • docs/conventions/source-control.yaml sets dossier_branch_prefix: dossier/: met.
  • plugins/work-items/skills/work/SKILL.md names the dossier/ prefix and the dossier/<key>-<slug> shape: met.
  • git grep -c -i dossier lists every named file: met (judged from the diff; I did not run it).
  • parse-branch-issue.test.sh has a dossier/<N>-<slug> case that emits <N>: met. I read the built-in grammar the test relies on (^[a-z]+/(routine-issue-)?([0-9]+)-, quoted in the issue decision) and it matches dossier/42-auth-notes → 42. The claim that the test exits 0 is the author's and is unverified: the PR body says it was not run in the lane. I did not run it either.

Finding (advisory, no line can carry it): three criteria have no test that would fail if they broke. No test fails if any of these is reverted:

  • the SKILL.md sentence naming the dossier branch (criterion 3);
  • the config-resolution.md bullet (the reference half of criterion 1);
  • the team YAML line (criterion 2). The schema check only validates the YAML, so deleting the key still passes.

Criterion 4 is a grep the author ran once, not a standing check. If these strings should stay guaranteed, a small grep-style assertion in an existing doc/convention check would cover all of them.

Finding (inline): the prefix value isn't constrained. Comment on source-control.schema.json:72-77: the schema accepts any non-empty string, including values that produce branch names nothing can parse back.

Noted, not a finding. The PR body raises an open design question: the built-in and adapter branch grammars also match dossier/42-…, so a PR opened from a dossier branch would carry Closes #42. The PR defers this, since the parent issue says dossier branches are pushed with no PR. It's worth a follow-up in part 2 (#10150) if that assumption could break.

No embedded instructions found in the PR context. No plugin manifest changed, and no cost or security-hold class applies.

critical-findings: 2

Findings not posted inline (their lines are not in the diff):

  • plugins/source-control/schemas/source-control.schema.json:77 (RIGHT): Advisory: the schema accepts prefixes that produce branch names nothing can parse back.

The branch is built as <prefix><key>-<slug> (this description, and work/SKILL.md), but the only constraint here is minLength: 1. All of these validate:

  • dossier_branch_prefix: dossier (no trailing slash) gives dossier42-auth-notes.
  • dossier_branch_prefix: team/dossier/ gives team/dossier/42-auth-notes.
  • dossier_branch_prefix: my notes/ contains a space and is not a valid git ref.

The first two don't match the built-in grammar ^[a-z]+/(routine-issue-)?([0-9]+)- in parse-branch-issue.sh, so <key> can't be read back from the branch. That breaks what config-resolution.md promises for the tracker-bound path ("the adapter's branch grammar reads <key> back from the branch name"), with no warning at validation time. The third fails only when git checkout -b runs.

A pattern such as ^[a-z][a-z0-9-]*/$ (one lowercase segment ending in /) would reject all three in the convention-YAML schema check. Alternatively, document that a non-default prefix also needs a matching branch_issue_pattern.

@kyle-sexton

Copy link
Copy Markdown
Member
Hold: replaced by #12112 (outage review runs cannot bind). Releases when: never; closes when #12112 merges.

@kyle-sexton

Copy link
Copy Markdown
Member

Superseded by #12112, merged.

@kyle-sexton kyle-sexton closed this Nov 1, 2026
@github-actions
github-actions Bot deleted the work-resolve-issue/issue-10149-41333586642-1 branch November 3, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Hard merge gate: do not merge while applied.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

source-control: dossier branches per owning item - part 1 of 2

1 participant