-
Notifications
You must be signed in to change notification settings - Fork 1
docs(archive): Lior PR preservation 4478 4477 #4479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
105 changes: 105 additions & 0 deletions
105
...ussions/PR-4477-rule-backlog-item-start-gate-extend-substrate-drift-discrimi.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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:18:02Z" | ||
| 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` | ||
|
|
||
|
|
||
| <details> <summary>ℹ️ About Codex in GitHub</summary> | ||
| <br/> | ||
|
|
||
| [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". | ||
|
|
||
| </details> | ||
|
|
||
| ### 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): | ||
|
|
||
| **<sub><sub></sub></sub> 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="" <sha> | 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 `<that file>` 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 <sha>`), 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. |
74 changes: 74 additions & 0 deletions
74
...cussions/PR-4478-docs-shard-0202z-close-0149z-orphan-branch-triage-full-file.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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:18:01Z" | ||
| 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)) | ||
|
Comment on lines
+38
to
+43
|
||
| - [x] Per-file diffs reproducible via `git diff origin/main..<sha> -- <path> | wc -l` on fresh `origin/main` worktree | ||
| - [x] All cross-references to PRs / rules use stable paths (no `<N>`-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. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This archived PR file uses a relative link target
(.claude/rules/backlog-item-start-gate.md)that is resolved fromdocs/pr-discussions/, so it points to a non-existentdocs/pr-discussions/.claude/...path rather than the repository rule file. In an archive meant for durable audit/reproduction, this breaks traceability for readers and tooling; use a repo-root-relative path (for example../../.claude/rules/...) or an absolute GitHub URL.Useful? React with 👍 / 👎.