feat(source-control): neutral tool-agnostic convention SSOT via convention_source - #1149
Conversation
…ntion_source (0.23.0) Author-directed reopen of #913's "no YAML / no path rename" decision (four grounds recorded in #1141: author directive, a real consuming machine hand-syncing three byte-identical regex copies, the ecosystem's prose-only AGENTS.md pointer standard with no machine format, and the audit checklist's recurring-concerns memory contradicting the decline). The team-tracked .claude/source-control.md may declare ## convention_source: a repo-relative flat-scalar YAML file (subject_pattern, pr_title_pattern, optional pr_body_required_sections list or none, optional dialect: defaulting posix-ere) consumed by enforcement and drafting as one source. Absent pointer = today's behavior, zero action for existing consumers. Path always repo-declared (no hardcoded doc root; no well-known search list in V1 — recorded). CC keyword + pr-title deferral marker identical on both surfaces. Neutral file authoritative per key, markdown-H2 fallback; plugin-only keys stay .claude/-side; user/local overlays unchanged. Enforcement contract unchanged: POSIX ERE only, unresolved = no enforcement, team-only policy floor incl. the pointer itself; broken pointer (absolute/backslash/.. path, missing file) or non-posix-ere dialect fails closed with a diagnostic, never a silent markdown fallback. lib/resolve-convention-pattern.sh extended; guardrails vendored copy synced byte-identical (guardrails 0.13.0 + CHANGELOG); 14 new resolver test cases (44 total, all pass). Incumbent markdown-H2 steelman and format decision walk-through recorded in the commit-convention seam README. setup apply gains the offer-and-migrate path that retires duplicated keys (spoke section + Gotcha + eval 18). Monorepo per-directory scoping out of scope V1, recorded. Closes #1141 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Warning Automated review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-running the job, or pushing a new commit, will retry the review. |
|
Warning Automated security review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-running the job, or pushing a new commit, will retry the review. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42b8cec308
ℹ️ 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".
…pointer The lexical path checks (absolute, backslash, ..) did not stop a repo-relative pointer naming a symlink — or sitting under a symlinked directory — whose physical target is outside the repository, letting untracked external content steer or disable the gate. The resolver now requires a REGULAR file whose physical directory (pwd -P, canonicalizing every symlinked segment) stays under the physical repo root; pure bash, no realpath dependency for the vendored hook copy. Codex review finding on PR #1149, classified VALID. Guardrails copy re-synced; symlink test cases added (auto-skip on filesystems where ln -s cannot symlink). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e94c21510
ℹ️ 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".
…ages neutral file with pointer Two Codex findings on PR #1149, both classified VALID: - A neutral file carrying `subject_pattern:` with an empty value was treated as an omitted key and silently fell back to the stale markdown H2 — the opposite of the carried-key-is-authoritative contract. A present-but-empty machine key now fails closed with a diagnostic (delete the line to opt into markdown fallback); checked at top level so the exit propagates, both keys checked for pr_title_pattern since the deferral marker re-reads subject_pattern. - The setup spoke's team-write verification staged only .claude/source-control.md, so a fresh neutral file could be left untracked — a committed pointer without its target hands every fresh checkout the missing-file fail-closed path. The SSOT section now requires staging the neutral file by explicit path in the same verification, with an ignore-rule match on it treated as a hard STOP. Guardrails copy re-synced; two empty-key test cases added (46 total). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
|
Pre-merge CI classification
Merging per the drive-to-merged directive on record for this issue chain (#1138 → #1141). |
Closes #1141
Summary
Author-directed reopen of #913's recorded "no YAML / no path rename" decision — the four reopen grounds (author directive, a real consuming machine hand-syncing three byte-identical regex copies, the ecosystem's prose-only AGENTS.md pointer standard with no machine format, and the plugin-audit recurring-concerns memory contradicting the decline) are recorded in #1141; a comment recording the outcome goes on #913 at merge.
The team-tracked
.claude/source-control.mdmay now declare## convention_source: a repo-relative flat-scalar YAML file (subject_pattern,pr_title_pattern, optionalpr_body_required_sectionslist ornone, optionaldialect:defaultingposix-ere) that enforcement (commit-msg hooks, CI) and drafting (any agent) consume as one source. Key contract points, all recorded in the commit-convention seam README:Conventional Commitskeyword and the pr-title deferral marker work identically on both surfaces.trailer_policy,pr_body_attribution) stay.claude/-side; user/local overlay layers unchanged...path, missing file) or a non-posix-eredialect fails closed with a diagnostic, never a silent markdown fallback that could enforce a migration-retired pattern.#comments + prose pointer doc); frontmatter-hybrid re-examined and declined for V1 with rationale.setup applygains the offer-and-migrate path: repo-chosen path, YAML write, pointer declaration, and retiring duplicated markdown keys so both surfaces are never authoritative for the same key. Monorepo per-directory scoping: out of scope V1, recorded.lib/resolve-convention-pattern.shextended; the guardrails vendored copy synced byte-identical viascripts/sync-resolve-convention-pattern.sh(gate: resolve-convention-pattern-sync), with guardrails 0.12.3 → 0.13.0 + CHANGELOG per the bump gate. source-control 0.22.0 → 0.23.0 + CHANGELOG.Test plan
bash lib/resolve-convention-pattern.test.sh: 44 cases, 0 failed — 14 new neutral-SSOT cases: quoted/double-quoted/unquoted YAML values, CC keyword and deferral marker in YAML, explicitposix-eredialect, non-ERE dialect → fail closed, missing-file pointer → fail closed with no stale markdown fallback, absolute/traversal pointer rejection, omitted-key markdown fallback, YAML-wins-over-unretired-duplicate, comment/blank inertness, overlay-pointer ignored (team-only floor).scripts/sync-resolve-convention-pattern.sh --check: guardrails copy byte-identical.skill-quality:checkonsetup: PASS, 0 errors.jq -evalidates both manifests and the evals file; new setup eval 18 covers the apply migration path.Related
🤖 Generated with Claude Code