Skip to content

feat(bugs): read gotchas from the config-cascade layers, not .claude - #18097

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-18003-44974097477-1
Nov 22, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-18003-44974097477-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #18003

Summary

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

concat-gotchas.sh now reads the config-cascade layers: a new file-typed gotchas_file userConfig option (passed as --user-file '${user_config.gotchas_file}'; empty or an unexpanded placeholder means unset), the team docs/conventions/bugs.md, and the personal override docs/conventions/bugs.local.md. During the dual-read window, ~/.claude/bugs.md and .claude/bugs.local.md are still read wherever the new file for their layer is absent. Each run prints one Warning line per old file, naming it, its new home and /bugs:setup apply. When both files exist, the new one wins and the warning names both. /bugs:setup check reports old files, and apply moves each one after a preview and a yes, checks that the new home resolves the same values, then deletes the old file (through retirement record bugs-r001 for .claude/bugs.local.md). Placement decisions (the issue's placement rule): ## Gotchas in ~/.claude/bugs.md is per-user prose with headings and fences, which no userConfig scalar or list can hold, so it goes to one file-typed option. lanes are globs about one repository, a per-repo convention, so they go to the personal override or the team file, with no new option. filing_posture goes to docs/conventions/work-items.yaml, where it already lives. The issue's criterion that removing the old-path read is a separate later change is met by keeping the read here.

Not verified

  • plugins/bugs/scripts/concat-gotchas.test.sh was not executed: this lane runs no test runner. Expectations were traced by hand and by the review subagent. Left to the PR's CI.
  • check-evals-quality could not run here (it rejected the suite case.yaml files with a jq parse error); CI's evals-quality and eval-cases jobs run it.
  • The skills docs do not say whether ${user_config.gotchas_file} is substituted before the !... pre-compute runs. If it is not, the script sees the placeholder and treats the option as unset. Scan and write therefore print the value on its own line and tell the model to Read that file when the…
  • Tidy skipped: the change is over the tidy cutoffs (25 files, 2 areas plugins/bugs and docs/contracts, plus scripts/shared-copies.txt under a listed shared path).
  • No retirement record for ~/.claude/bugs.md (machine scope; the retired-conventions contract covers repository-scope paths only), and none for the .claude/**/.local. gitignore line, which other plugins still recommend.
  • The README options table is generated by scripts/sync-plugin-options-docs.py, which this lane cannot run. The gotchas_file row was hand-written to match the manifest description; CI's drift check confirms it.
  • A follow-up issue for removing the old-path read (once no old file is reported) was not filed; the issue says it is a separate later change.

Fix

  • plugins/bugs/scripts/concat-gotchas.sh: takes --user-file, reads the userConfig, team and new personal override layers, falls back to each old path only while the new file is absent, labels old-path blocks '(old path)', and prints one warning per old file after the blocks. The header comment was…
  • plugins/bugs/scripts/concat-gotchas.test.sh: run_case passes script arguments. Cases cover new layers only, old files only (values apply, one warning each), an empty option value and an unexpanded placeholder, both present (new wins, warning names both), the option naming the old file, the option…
  • plugins/bugs/.claude-plugin/plugin.json: new gotchas_file userConfig option (type file).
  • plugins/bugs/skills/scan/SKILL.md, plugins/bugs/skills/write/SKILL.md: the pre-compute passes the option, a 'Personal gotchas file' line shows its value with an instruction to Read it if the block lacks it, the gotchas bullet names the new layers and tells the model to relay Warning lines, and the…
  • plugins/bugs/skills/setup/SKILL.md: check B6 reports old paths and runs check-retirements.sh. apply gains 'Move old paths first' (preview, yes, write the new home, verify it resolves the same values, then delete through --clean bugs-r001 or directly for ~/.claude/bugs.md) ahead of 'Converge the…
  • plugins/bugs/reference/config.md: new layer table, an 'Old paths (dual-read window)' section with per-key read rules and a placement table, the file format and gotchas text, and the .gitignore line docs/conventions/**/.local..
  • plugins/bugs/README.md: option rows (hand-written and the generated options table), layer prose, and the setup description.
  • plugins/bugs/retirements.yaml: new, record bugs-r001 (kind file, .claude/bugs.local.md, action migrate).
  • plugins/bugs/lib/check-retirements.sh: new generated copy of the shared helper (sync-shared-copies).
  • scripts/shared-copies.txt: registers the bugs copy of lib/check-retirements.sh.
  • plugins/bugs/evals/su-check-layer-provenance/case.yaml, prompt.md, samples/names-each-layer.json, samples/names-retirement.json: the layer regex accepts gotchas_file, a new names-retirement grader covers bugs-r001, and samples are added.
  • plugins/bugs/evals/su-apply-writes-team-lanes/{case.yaml,prompt.md,samples/recommends-ignore-line.json}, plugins/bugs/evals/su-apply-output-dir-routes-native/{case.yaml,prompt.md,samples/recommends-ignore-line.json}: the expected ignore line is now docs/conventions/**/.local..
  • docs/contracts/config-cascade/README.md: the bugs Implementers row names the new layers, the dual-read window and bugs-r001, and the conformance-registry row wording is updated.
  • docs/contracts/config-cascade/consumer-gotchas.md: the bugs layer list.
  • docs/contracts/config-cascade/CHANGELOG.md: Unreleased entry for the bugs row (no contract change).
  • .changes/bugs/work-resolve-issue-issue-18003-44974097477-1-6e276b37.md: minor changelog fragment.

Verification

The runner ran each check from the base copy against 8674688:

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

The run reports:

  • check-changelog-fragments: all 8 fragments valid.
  • check-changed-skills: scan, setup and write PASS with 0 errors (warnings only on size and description length, pre-existing in kind).
  • check-affected: 16 passed, 8 skipped, 0 failed over 25 changed files. An earlier run failed markdownlint MD029 in setup/SKILL.md and the comment lint on the script header and the retirements.yaml header; all three were fixed and re-run.
  • cant-fail-scan --file plugins/bugs/scripts/concat-gotchas.test.sh: no can't-fail tests found.
  • sync-shared-copies: generated plugins/bugs/lib/check-retirements.sh, exit 0.
  • Fresh-context review subagent over the whole diff: it traced every test expectation and found no script bug. Its doc and flow findings were fixed: user-layer warning wording, per-key dual-read for ~/.claude/bugs.md, move-step ordering for team lanes, setup write-scope wording, stale eval prompts,…
  • read https: //code.claude.com/docs/en/plugins/manifest-reference: userConfig types include file; ${user_config.KEY} is substituted in skill and agent content (non-sensitive values only); CLAUDE_PLUGIN_OPTION_<KEY> is exported to hook processes only, not to Bash tool commands.
  • read https: //code.claude.com/docs/en/skills: injected !command lines run before the content reaches Claude; the page lists no ${user_config.*} substitution and does not say whether substitution precedes injected commands.
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44974097477

Left out: the items under Not verified.

Related

#18003

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs

Run 44976147128, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44976147128

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-security-review: 1 inline finding(s) on 86746887ca2f8362dc0ddac63cbc650660716962; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

Comment thread plugins/bugs/.claude-plugin/plugin.json Resolved
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 74d458367e07ea35b11305faec528c3de0ffc291: read 25 of 25 changed file(s); 1 finding(s), 0 as inline comments.

Security review: PR #18097 (bugs: read gotchas from the config-cascade layers)

This lane already reviewed earlier heads of this pull request, so this review is blocking only: it reports CRITICAL and IMPORTANT findings and leaves out SUGGESTION ones. I read every hunk of all 24 in-scope files in .claude-lane/pr.diff. The second recommends-ignore-line.json (under su-apply-writes-team-lanes) is an identical copy of an eval sample. Its path does not change what its content does.

Findings

Checked, no new finding

  • concat-gotchas.sh: the personal override moves from .claude/bugs.local.md to docs/conventions/bugs.local.md.

    • The new file is inside the repository, at the same trust level as docs/conventions/bugs.md, the team file the base already reads.
    • The old path is read only while the new file is absent.
    • The script only extracts sections with awk and prints them. Every path is quoted and nothing is evaluated.
    • A value that is still an unexpanded ${user_config.…} placeholder counts as unset.
  • lib/check-retirements.sh: this is a new generated copy of the shared helper.

    • --clean refuses a root that is not a repository.
    • A migrate record needs --i-migrated before anything is removed.
    • Before rm -f, it re-resolves the target's parent directory and confirms it is inside the root.
    • Record bugs-r001 is kind: file with path .claude/bugs.local.md and action: migrate.
  • Instruction surface (skills/setup/SKILL.md): apply now also moves and deletes old config files. I checked this by consequence, for destructive actions. These gates remain:

    • a preview and a yes for each file;
    • a check that the new home gives the same values before the old file is deleted;
    • a git check-ignore check before the personal override is written;
    • the old file's content treated as untrusted input;
    • disable-model-invocation: true, so only the user can start the skill.

    The rules against touching settings, pluginConfigs, userConfig and .gitignore are unchanged.

  • Trust controls: no trusted-actor, kill-switch, token-broker or merge-hold file is touched.

  • PR context: it contains no instructions aimed at this lane.

  • Spend: none.

critical-findings: 0

Manifest lines (1)

Lane-Activity: pr-unblock/resolve-conflicts
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-conflict-patch

Run 44981085055, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 74d4583
Run 44981085055

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 74d458367e07ea35b11305faec528c3de0ffc291: read 25 of 25 changed file(s); 0 finding(s), 0 as inline comments.

Code review: bugs now reads gotchas from the config-cascade layers (#18097, closes #18003)

This review reports blocking findings only. This lane already reviewed earlier heads of this PR, most recently 98ad81e7, so it skips advisory findings this time (the prior-findings file says blocking only: yes). The new head 74d45836 merges main into the branch again. I read every hunk of all 24 files in the full diff. The two recommends-ignore-line.json samples are identical copies, so I read only the first.

What the change does. concat-gotchas.sh now reads gotchas from three layers, in this order:

  1. the file the new gotchas_file userConfig option names, passed in as --user-file;
  2. the team file docs/conventions/bugs.md;
  3. the personal override docs/conventions/bugs.local.md.

For any layer whose new file is missing, the script still reads the old ~/.claude/bugs.md or .claude/bugs.local.md. It prints one Warning: line for each old file it finds, and that warning names /bugs:setup apply. In setup, check B6 reports old files, and apply gains a move step that shows a preview and waits for a yes. Retirement record bugs-r001 covers the old .claude/bugs.local.md, using the shared check-retirements.sh copy.

Script trace. I re-traced emit_layer_or_old and the root, user and personal handling by hand at this head; I ran nothing. These cases behave as the expected strings in concat-gotchas.test.sh say:

  • only the new layers exist;
  • only the old files exist;
  • the option is empty, or is an unexpanded ${user_config.*} placeholder;
  • both old and new files exist (the new file wins, and the warning names both);
  • the option names the old file;
  • the option names a file that does not exist;
  • the option names the team file;
  • the session is rooted at $HOME.

The PR author says the test file was not executed; that is still unverified.

Acceptance criteria from #18003. None is blocking:

  • Read the config-cascade layers: met.
  • Keep reading old files during the transition, with one warning per old file naming the new location and the setup command: met and tested.
  • Setup previews, asks for a yes, moves the settings, checks they resolve the same, then deletes the old file: met in the text of setup/SKILL.md.
  • Removing the old-path read is a separate later change: met, since the read is kept.
  • Tests cover new-only, old-only and both present: met.

Blocking findings: none.

Loosened checks would be marked: fail. That is the default, because the prompt has no loosened_check_verdict: or loosened_check_patterns: line, so I used 0 consumer patterns. With no loosened_check_decision_record: line, I did not check the citation requirement. The eval regex and sample edits follow the issue's "Desired behavior" table rather than loosening a check:

  • the ignore line is now docs/conventions/**/*.local.*;
  • names-each-layer also accepts gotchas_file;
  • a names-retirement grader is added.

Spend: nothing beyond the existing eval and test runs.

Advisory and manifest lines (3)
  • manifest userConfig.gotchas_file: pass. It is a new file option with no default, and scan, write and setup read it through ${user_config.gotchas_file}.
  • manifest version: pass. The fragment's bump: minor fits an added option plus a path move that keeps reading the old files.
  • manifest description: pass. No capability is removed, and the description names no config path.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback

Run 44979296529, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44979296529

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 98ad81e.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback

Run 44979296529, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44979296529

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 22, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the lane left a review finding open and no adjudicator verdict settled it: none was recorded, it found the finding does not hold where the lane had not disputed it (an UNCERTAIN or VALID-defer reply), which only an INCORRECT reply lets a verdict resolve, it found the finding asks only for tests whose covering check runs had not all passed when the round began, or it raised a security question on a finding the security-review lane rated below CRITICAL; so a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=18097 -f activity=address-feedback

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation

Run 44984516460, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 44984516460

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 74d458367e07ea35b11305faec528c3de0ffc291. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/address-feedback is failure), which clears when the
  lane runs again

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/resolve-conflicts

Run 44981085055, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44981085055

Failed GitHub API calls

No failed call recorded by the run job's scripts.

Lane-Activity: pr-unblock/resolve-conflicts
@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 22, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head 74d458367e07ea35b11305faec528c3de0ffc291, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=HIGH demote=true head=74d458367e07ea35b11305faec528c3de0ffc291 rubric=10.6.1 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 9ddaf0c Nov 22, 2026
118 of 119 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-18003-44974097477-1 branch November 22, 2026 05:26
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 9ddaf0c8d9d1ef89ef32ca3b74378a011ab1de11; later checks count it verified from this comment.

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.

bugs: read config from the config-cascade layers, not ~/.claude

1 participant