diff --git a/docs/pr-discussions/PR-4472-shard-2026-05-21-0149z-orphaned-branch-triage-substrate-drif.md b/docs/pr-discussions/PR-4472-shard-2026-05-21-0149z-orphaned-branch-triage-substrate-drif.md new file mode 100644 index 0000000000..f1640bf54d --- /dev/null +++ b/docs/pr-discussions/PR-4472-shard-2026-05-21-0149z-orphaned-branch-triage-substrate-drif.md @@ -0,0 +1,48 @@ +--- +pr_number: 4472 +title: "shard(2026-05-21/0149Z): orphaned-branch triage \u2014 substrate-drift discriminator generalizes" +author: "AceHack" +state: "MERGED" +created_at: "2026-05-21T01:56:38Z" +merged_at: "2026-05-21T01:58:14Z" +closed_at: "2026-05-21T01:58:14Z" +head_ref: "shard/tick-0149z-otto-cli-orphaned-branch-mostly-rescued-substrate-drift-discriminator-generalizes-2026-05-21" +base_ref: "main" +archived_at: "2026-05-21T02:51:37Z" +archive_tool: "tools/pr-preservation/archive-pr.ts" +--- + +# PR #4472: shard(2026-05-21/0149Z): orphaned-branch triage — substrate-drift discriminator generalizes + +## PR description + +## Summary + +Follow-up to [PR #4461](https://github.com/Lucent-Financial-Group/Zeta/pull/4461) + [PR #4468](https://github.com/Lucent-Financial-Group/Zeta/pull/4468) (0059Z cold-boot + corrections). Verifies the orphaned `otto/2012z-...` branch carry-forward against current `origin/main`. + +**Finding**: 4 of 5 orphaned commits' substrate is already rescued via peer agents. HC-8 NCI (`f0abf3ed`) was landed by [PR #4205](https://github.com/Lucent-Financial-Group/Zeta/pull/4205) between 2026-05-18 (orphan creation) and 2026-05-21 (cold-boot). The 0059Z carry-forward overestimated re-landing needs. + +**Generalization**: the substrate-drift discriminator from [`.claude/rules/backlog-item-start-gate.md`](https://github.com/Lucent-Financial-Group/Zeta/blob/main/.claude/rules/backlog-item-start-gate.md) step 0 (row-scope) generalizes to **orphaned-branch scope**: before re-landing, run `git diff origin/main..` per file. 0 lines = fully rescued; 20-50 = partial drift; hundreds = genuine deltas worth cherry-picking. + +**DO NOT re-apply `467424ec` Lior prompt fix** — Lior's prompt has evolved repeatedly since 2026-05-18; re-applying the stranded fix would regress 22 lines of newer prompt-engineering work. + +## Verify + +- 1 file added: `docs/hygiene-history/ticks/2026/05/21/0149Z.md` (83 lines) +- Pre-push gate passed (MD032 / markdownlint / relative-path audit) +- Branch off current `origin/main` (`7dd66fb7`) — no rebase conflict expected + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + +## Reviews + +### COMMENTED — @copilot-pull-request-reviewer (2026-05-21T01:58:19Z) + +## Pull request overview + +Adds a new hygiene-history tick shard documenting an orphaned-branch triage verification against `origin/main`, and generalizes the existing “substrate-drift discriminator” concept to orphaned-commit triage so future sessions avoid redundant re-landing or regressions. + +**Changes:** +- Adds tick 0149Z documenting that most orphaned commits’ substrate is already present on `origin/main` (via other PRs/rescues). +- Introduces an “orphaned-branch triage discriminator” procedure using `git show` + `git diff origin/main.. -- ` to classify rescue vs drift vs real deltas. +- Records explicit guidance not to re-apply the stale Lior prompt fix commit due to on-main evolution. diff --git a/docs/pr-discussions/PR-4477-rule-backlog-item-start-gate-extend-substrate-drift-discrimi.md b/docs/pr-discussions/PR-4477-rule-backlog-item-start-gate-extend-substrate-drift-discrimi.md new file mode 100644 index 0000000000..2d613771b9 --- /dev/null +++ b/docs/pr-discussions/PR-4477-rule-backlog-item-start-gate-extend-substrate-drift-discrimi.md @@ -0,0 +1,105 @@ +--- +pr_number: 4477 +title: "rule(backlog-item-start-gate): extend substrate-drift discriminator to orphaned-branch scope" +author: "AceHack" +state: "MERGED" +created_at: "2026-05-21T02:11:37Z" +merged_at: "2026-05-21T02:13:36Z" +closed_at: "2026-05-21T02:13:36Z" +head_ref: "rule/backlog-item-start-gate-extend-substrate-drift-discriminator-to-orphaned-branch-scope-2026-05-21" +base_ref: "main" +archived_at: "2026-05-21T02:51:36Z" +archive_tool: "tools/pr-preservation/archive-pr.ts" +--- + +# PR #4477: rule(backlog-item-start-gate): extend substrate-drift discriminator to orphaned-branch scope + +## PR description + +## Summary + +Extends [`.claude/rules/backlog-item-start-gate.md`](https://github.com/Lucent-Financial-Group/Zeta/blob/main/.claude/rules/backlog-item-start-gate.md) with a new **Orphaned-branch triage discriminator** section that generalizes the existing row-scope substrate-drift discriminator (step 0) to the orphaned-branch surface. + +## Why + +Per [`.claude/rules/wake-time-substrate.md`](https://github.com/Lucent-Financial-Group/Zeta/blob/main/.claude/rules/wake-time-substrate.md): *"Every load-bearing learning must reach CLAUDE.md or a pointer from it."* + +The discovery captured in [PR #4472](https://github.com/Lucent-Financial-Group/Zeta/pull/4472) (0149Z follow-up shard) — that 4 of 5 orphaned commits on `otto/2012z-...` had already been rescued via peer agents — sits in a tick shard alone. The auto-loaded rule is where the discriminator needs to live to actually reach future-Otto cold-boots before they over-triage orphaned branches. + +## What the extension adds + +- **3-step verification procedure** (grep main for rescue PR; per-file diff; line count) +- **3-tier interpretation table** (`0 lines` = rescued / `20–50` = partial drift / `hundreds` = genuine deltas) +- **Special-case guard for runtime scripts** (`.gemini/bin/lior-loop-tick.ts` and similar): DO NOT re-apply without operator awareness even with large diffs, because runtime scripts evolve continuously on main +- **Empirical anchors**: [PR #4205 (HC-8 rescue)](https://github.com/Lucent-Financial-Group/Zeta/pull/4205) + [PR #4461 (0059Z cold-boot)](https://github.com/Lucent-Financial-Group/Zeta/pull/4461) + [PR #4472 (0149Z discovery)](https://github.com/Lucent-Financial-Group/Zeta/pull/4472) +- **Composes-with** edge to [`honor-those-that-came-before.md`](https://github.com/Lucent-Financial-Group/Zeta/blob/main/.claude/rules/honor-those-that-came-before.md): verifying substrate-on-main IS the honor at orphaned-commit scope + +## Verify + +- 1 file modified: `.claude/rules/backlog-item-start-gate.md` (+59 lines) +- Pre-push gate passed (MD032 / markdownlint / relative-path audit) +- Markdownlint required restructure — original attempt as `0a.` step broke ordered-list parsing (MD029); refactored as a top-level sub-section after the main gate steps + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + +## Reviews + +### COMMENTED — @chatgpt-codex-connector (2026-05-21T02:13:45Z) + + +### 💡 Codex Review + +Here are some automated review suggestions for this pull request. + +**Reviewed commit:** `1a0ce66e51` + + +
ℹ️ About Codex in GitHub +
+ +[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). 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". + +
+ +### COMMENTED — @copilot-pull-request-reviewer (2026-05-21T02:14:10Z) + +## Pull request overview + +This PR extends the factory’s backlog-item start gate rule with an orphaned-branch triage discriminator, aimed at preventing duplicate or regressive re-landing of already-rescued substrate when a cold-boot session discovers an orphaned feature branch. + +**Changes:** +- Adds an “Orphaned-branch triage discriminator” section with a lightweight verification procedure and interpretation tiers. +- Adds a runtime-script guard warning against re-applying stale versions of continuously-evolving operational scripts. +- Adds new composition/anchor references in the “Composes with” section to support the new discriminator guidance. + +## Review threads + +### Thread 1: .claude/rules/backlog-item-start-gate.md:90 (unresolved) + +**@chatgpt-codex-connector** (2026-05-21T02:13:45Z): + +**![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat) Compare all touched files before classifying rescue** + +This procedure can misclassify multi-file commits as fully rescued because it samples only the first changed file and then treats `0 lines` as “fully rescued.” If that first file happens to match `origin/main` but later files in the same commit still differ, the workflow will incorrectly skip re-landing real deltas and lose substrate. The check should diff the entire commit (or every touched file), not `head -1`. + +Useful? React with 👍 / 👎. + +### Thread 2: .claude/rules/backlog-item-start-gate.md:89 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-21T02:14:10Z): + +P0: `git show --name-only --format="" | head -1` is likely to return a blank line (git prints an empty separator line before the filename list when the commit header is suppressed), so `` becomes empty and the next `git diff` step won’t work as written. Use a command that never emits the leading blank line (e.g., `git diff-tree --no-commit-id --name-only -r `), or filter empty lines before `head -1`. + +### Thread 3: .claude/rules/backlog-item-start-gate.md:101 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-21T02:14:10Z): + +The procedure picks only the first file in the commit and then classifies drift based on “count lines” of raw `git diff` output. Both can misclassify: a commit may have mixed rescued/unrescued files, and diff line-count includes headers/context and can vary by settings. Consider iterating over all touched files and using a stable metric like `--numstat`/`--shortstat` (or `--stat`) for the size tiers. diff --git a/docs/pr-discussions/PR-4478-docs-shard-0202z-close-0149z-orphan-branch-triage-full-file.md b/docs/pr-discussions/PR-4478-docs-shard-0202z-close-0149z-orphan-branch-triage-full-file.md new file mode 100644 index 0000000000..fd2f6b7e04 --- /dev/null +++ b/docs/pr-discussions/PR-4478-docs-shard-0202z-close-0149z-orphan-branch-triage-full-file.md @@ -0,0 +1,74 @@ +--- +pr_number: 4478 +title: "docs(shard/0202Z): close 0149Z orphan-branch triage \u2014 full-file verification" +author: "AceHack" +state: "MERGED" +created_at: "2026-05-21T02:12:11Z" +merged_at: "2026-05-21T02:14:00Z" +closed_at: "2026-05-21T02:14:01Z" +head_ref: "shard/tick-0202z-orphan-branch-triage-closeout-otto-cli-2026-05-21" +base_ref: "main" +archived_at: "2026-05-21T02:51:35Z" +archive_tool: "tools/pr-preservation/archive-pr.ts" +--- + +# PR #4478: docs(shard/0202Z): close 0149Z orphan-branch triage — full-file verification + +## PR description + +## Summary + +Closes the [PR #4472 (0149Z)](https://github.com/Lucent-Financial-Group/Zeta/pull/4472) carry-forward by upgrading the first-file spot-check to **full per-file diff verification** across all 5 orphaned commits on the local-only branch `otto/2012z-land-nci-tonal-momentum-rules-cross-substrate-triangulator-skill-2026-05-18`. + +## Verification table (all diffs vs `origin/main` HEAD `9e0b316a`) + +| Commit | Verdict | +|---|---| +| `f0abf3ed` HC-8 NCI (2 files) | Fully rescued via [PR #4205](https://github.com/Lucent-Financial-Group/Zeta/pull/4205) → `2df803c5` | +| `29d89be8` Agora V6 followup (4 files) | **0 lines diff on ALL 4 files** — fully rescued (upgrades 0149Z's "likely fully rescued" to confirmed) | +| `09a9a3c2` V6 constitution (32 files) | 20-163 line drift; main version preferred per discriminator | +| `2ca87ef8` Mirror/Beacon (4 files) | 30-37 line uniform drift; main version preferred | +| `467424ec` Lior prompt | 22 lines diff — DO NOT re-apply (Lior prompt evolved) | + +Branch is **local-only** (`git ls-remote origin "otto/2012z-..."` returns empty) → no remote cleanup needed. + +## Operational outcome + +- Closes 0149Z carry-forward ("spot-check the 4 remaining commits more carefully") +- Adds empirical-anchor confirmation that the substrate-drift discriminator generalizes from row-scope ([`backlog-item-start-gate.md`](.claude/rules/backlog-item-start-gate.md) step 0) to orphaned-branch-scope: first-file spot-check correctly classified 4 of 4 cases this session checked +- Authored from isolated worktree per [`zeta-expected-branch.md`](.claude/rules/zeta-expected-branch.md) race-window-caveat (contested root has 311 stale mods + 52 stashes from prior-session state) + +## Test plan + +- [x] `git ls-tree HEAD` = 53 (canary check per [`codeql-no-source-on-docs-only-pr-is-broken-commit-canary.md`](.claude/rules/codeql-no-source-on-docs-only-pr-is-broken-commit-canary.md)) +- [x] Per-file diffs reproducible via `git diff origin/main.. -- | wc -l` on fresh `origin/main` worktree +- [x] All cross-references to PRs / rules use stable paths (no ``-style placeholders) +- [ ] CI runs (docs-only, no F# touched) + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + +## Reviews + +### COMMENTED — @copilot-pull-request-reviewer (2026-05-21T02:15:21Z) + +## Pull request overview + +Adds a new hygiene-history tick shard (0202Z) to close the 0149Z orphaned-branch triage carry-forward by documenting full per-file diff verification for all commits on the stranded local-only branch. + +**Changes:** +- Adds `0202Z` tick documenting full file-by-file verification of 5 orphaned commits vs `origin/main`. +- Records the supersession verdict and restates the discriminator with an empirical-anchor confirmation. + +## Review threads + +### Thread 1: docs/hygiene-history/ticks/2026/05/21/0202Z.md:13 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-21T02:15:21Z): + +P1: In the `f0abf3ed` row, “2 files (`docs/ALIGNMENT.md`, new rule)” is ambiguous and appears inconsistent with the referenced rescue PR description (which indicates the second file was a research doc). Please name the exact second file path (or clarify what “new rule” refers to) so the verification is reproducible and the cross-reference stays accurate. + +### Thread 2: docs/hygiene-history/ticks/2026/05/21/0202Z.md:15 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-21T02:15:21Z): + +P1: The parenthetical “B-0633 was subsequently deleted on main per `git status`” is inaccurate/unclear: there is currently a `docs/backlog/P3/B-0633-...md` on main, and `git status` isn’t a reliable way to assert deletion history. Suggest rewording to the specific file/renumbering event you observed (e.g., B-0633→B-0649) or drop the deletion claim. diff --git a/docs/pr-discussions/PR-4485-docs-shard-0226z-52-stash-survey-drop-tier-classification-su.md b/docs/pr-discussions/PR-4485-docs-shard-0226z-52-stash-survey-drop-tier-classification-su.md new file mode 100644 index 0000000000..5591b1b8f6 --- /dev/null +++ b/docs/pr-discussions/PR-4485-docs-shard-0226z-52-stash-survey-drop-tier-classification-su.md @@ -0,0 +1,126 @@ +--- +pr_number: 4485 +title: "docs(shard/0226Z): 52-stash survey + drop-tier classification (survey only)" +author: "AceHack" +state: "MERGED" +created_at: "2026-05-21T02:41:35Z" +merged_at: "2026-05-21T02:43:14Z" +closed_at: "2026-05-21T02:43:14Z" +head_ref: "shard/tick-0226z-52-stash-survey-otto-cli-2026-05-21" +base_ref: "main" +archived_at: "2026-05-21T02:51:34Z" +archive_tool: "tools/pr-preservation/archive-pr.ts" +--- + +# PR #4485: docs(shard/0226Z): 52-stash survey + drop-tier classification (survey only) + +## PR description + +## Summary + +Picks up the [PR #4478 (0202Z)](https://github.com/Lucent-Financial-Group/Zeta/pull/4478) carry-forward at stash scope: vintage-stratified survey of all 52 stashes on the contested-root worktree with drop-tier classification. + +## Drop-tier classification + +| Tier | Count | Description | +|---|---|---| +| **A** — clear drop | 11 | Empties, duplicates, worktree-agent orphans (IDs no longer exist) | +| **B** — verify-then-drop | ~30 | Stashes on `feat/*` and `main` branches with cited PR # long-merged | +| **C** — operator review | 5-6 | Substantive stashes with named topics (large diffs, distinct research content) worth inspection before drop | + +**Roughly ~80% of stashes are clear or near-clear drop candidates.** + +## Substrate-drift discriminator extends to third surface + +Extends the [`backlog-item-start-gate.md`](.claude/rules/backlog-item-start-gate.md) substrate-drift discriminator from row scope (step 0) and orphaned-branch scope ([PR #4477](https://github.com/Lucent-Financial-Group/Zeta/pull/4477) + [PR #4482](https://github.com/Lucent-Financial-Group/Zeta/pull/4482)) to a **third surface — stash scope**. Each surface confirms the cheap heuristic operates reliably across substrate-locations. + +## Operational stance + +**Survey only.** No `git stash drop` operations performed this tick. Operator decides actual drops with this classification as evidence. + +## Note — PR-create deferred via pure-git tier + +Branch was pushed at 0226Z but `gh pr create` was blocked by GraphQL exhaustion (0/5000). Per [`refresh-world-model-poll-pr-gate.md`](.claude/rules/refresh-world-model-poll-pr-gate.md) Pure-git tier discipline, substrate ships via branch push; PR creation defers to post-reset tick. This PR is the post-reset open (rate reset at ~0241Z; PR opened ~14 min after the branch landed via pure-git). + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + +## Reviews + +### COMMENTED — @copilot-pull-request-reviewer (2026-05-21T02:43:45Z) + +## Pull request overview + +Adds a new hygiene-history tick shard (0226Z) documenting a survey of the contested-root worktree’s 52 git stashes, stratified by age and classified into drop tiers (A/B/C), as evidence for an operator-led cleanup. The shard also frames the stash triage as an extension of the existing substrate-drift discriminator (row-scope + orphaned-branch-scope) to a third surface (stash-scope). + +**Changes:** +- Add a 52-stash vintage stratification table and Tier A/B/C classification with per-stash notes. +- Document how the existing substrate-drift discriminator composes at stash scope, including verification bullets and cross-links to related rules/PRs. + +### COMMENTED — @chatgpt-codex-connector (2026-05-21T02:44:41Z) + + +### 💡 Codex Review + +Here are some automated review suggestions for this pull request. + +**Reviewed commit:** `3d5b536bcf` + + +
ℹ️ About Codex in GitHub +
+ +[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). 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". + +
+ +## Review threads + +### Thread 1: docs/hygiene-history/ticks/2026/05/21/0226Z.md:109 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-21T02:43:44Z): + +The "Tier A duplicates are byte-identical" verify bullet is inconsistent with the Tier A table: stash@{20} is described as an empty stash while stash@{21} has a non-empty diff, and stash@{41}/{42}/{44} are described with different diff sizes. If the intent is "same base commit + same description", reword this bullet accordingly (and avoid claiming byte-identical content). + +### Thread 2: docs/hygiene-history/ticks/2026/05/21/0226Z.md:92 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-21T02:43:44Z): + +Tier C is fully enumerated here as 6 stashes (14, 16, 17, 26, 31, 37), but the subtotal and accounting table still say "5-6" / "~5-6". Since the list is explicit, consider tightening these to an exact count to keep the accounting internally consistent. + +### Thread 3: docs/hygiene-history/ticks/2026/05/21/0226Z.md:40 (unresolved) + +**@chatgpt-codex-connector** (2026-05-21T02:44:42Z): + +**![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat) Move non-empty stash out of clear-drop tier** + +`stash@{21}` is marked Tier A ("almost-certainly droppable") even though this same row says it has `5 files / 287+136 changes` and is likely the actual content-bearing copy. Classifying a substantive stash as clear-drop creates a real risk of irreversible work loss if Tier A entries are dropped in bulk without inspection. + +Useful? React with 👍 / 👎. + +### Thread 4: docs/hygiene-history/ticks/2026/05/21/0226Z.md:92 (unresolved) + +**@chatgpt-codex-connector** (2026-05-21T02:44:42Z): + +**![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat) Fix Tier D totals to match listed stash IDs** + +The Tier D accounting says Tier B is `~30` with `~5-6` uncategorized, but the Tier B/C tables above already enumerate all remaining stash IDs (`35` in B and `6` in C), which fully accounts for 52 with no uncategorized remainder. This mismatch makes the survey internally inconsistent and can mislead operator follow-up. + +Useful? React with 👍 / 👎. + +### Thread 5: docs/hygiene-history/ticks/2026/05/21/0226Z.md:109 (unresolved) + +**@chatgpt-codex-connector** (2026-05-21T02:44:42Z): + +**![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat) Correct duplicate-verification claim for stash sets** + +The verify bullet asserts stash groups are "byte-identical," but earlier rows record materially different diff sizes for those same stashes (for example `stash@{20}` empty vs `stash@{21}` with 5-file changes, and `stash@{41}/{42}/{44}` with different line counts). This overstates validation evidence and can justify incorrect drops. + +Useful? React with 👍 / 👎.