Skip to content

fix(sync): specialize drift repair by consumer - #3168

Merged
stranske merged 5 commits into
mainfrom
automation/docs-drift-followup-3
Aug 22, 2026
Merged

stranske merged 5 commits into
mainfrom
automation/docs-drift-followup-3

Conversation

@stranske

@stranske stranske commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep full semantic claim identity for dedupe, batching, and issue markers while retaining bounded display targets
  • avoid running the unrelated full deterministic drift scan for semantic-only repair batches
  • retain vendored node_modules exceptions only for consumers whose .github/scripts/package.json declares a file:node_modules/ dependency
  • preserve the frozen legacy semantic issue renderer and force status-ignore ownership changes through full delivery scope

Source review debt

  • Travel-Plan-Permission#1465 PRRT_kwDOPrFQ5c6bajoV
  • trip-planner#1754 PRRT_kwDOOzvyds6bajwC
  • Portable-Alpha-Extension-Model#2233 PRRT_kwDOO15QxM6bajjH
  • Portable-Alpha-Extension-Model#2233 PRRT_kwDOO15QxM6bajjJ

The older Portable threads PRRT_kwDOO15QxM6baR8N and PRRT_kwDOO15QxM6baR8Q remain held on the defective candidate; their source corrections already landed in #3167.

Validation

  • focused source/template/scope contract suite — 109 passed
  • uv run --extra dev pytest -q -n auto — 4951 passed, 8 skipped, 3 expected xfails
  • uv run --with ruff ruff check ... — passed on all changed Python surfaces
  • Black 26.5.1 formatting applied; root/template script pairs are byte-identical
  • python3 scripts/validate_template_sync.py — passed
  • python3 scripts/validate_template_completeness.py --strict — passed
  • python3 scripts/check_template_drift.py — zero unallowlisted drift
  • python scripts/sync_status_file_ignores.py --check — passed for the Workflows vendored package layout

Rollout

This requires a full Maint 68 candidate plan because the conditional managed .gitignore reconciliation is performed by full delivery, not source-delta delivery.

The scope selector now also rejects source-delta ranges that touch the status-ignore reconciler, its consumer copy, or the consumer .gitignore template, so this requirement is enforced rather than advisory.

@stranske stranske added agent:codex Agent-created issues from Codex agent-high-privilege Grants elevated permissions for agent workflows codex codex-automation labels Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in: 12 minutes

Limit details: You’ve used the included review currently available. Your 67 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a16c6e13-a7ad-49a1-a28c-8bb42c95dd47

📥 Commits

Reviewing files that changed from the base of the PR and between f49a694 and e8e030c.

📒 Files selected for processing (13)
  • docs/WORKFLOW_GUIDE.md
  • docs/ci/WORKFLOWS.md
  • docs/ops/CONSUMER_REPO_MAINTENANCE.md
  • docs/ops/LOCAL_LANES.md
  • scripts/docs_drift_fix_agent.py
  • scripts/scope_consumer_sync_plan.py
  • scripts/sync_status_file_ignores.py
  • templates/consumer-repo/.gitignore
  • templates/consumer-repo/scripts/docs_drift_fix_agent.py
  • templates/consumer-repo/scripts/sync_status_file_ignores.py
  • tests/scripts/test_docs_drift_fix_agent.py
  • tests/scripts/test_scope_consumer_sync_plan.py
  • tests/scripts/test_sync_status_file_ignores.py

Comment @coderabbitai help to get the list of available commands.

@stranske

Copy link
Copy Markdown
Owner Author

@codex review

Please review the exact current head against the four source-owned consumer thread acceptance criteria listed in the PR body, including execution-path coverage for registry versus deliberately vendored package layouts.

@stranske
stranske temporarily deployed to agent-high-privilege August 22, 2026 18:49 — with GitHub Actions Inactive
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

PR #3168 | Agent: Codex | Iteration 0/12

Current State

Metric Value
Iteration progress [----------] 0/12
Action wait (gate-cancelled-transient)
Disposition skipped (transient)
Gate cancelled
Tasks 0/7 complete
Timeout 45 min (default)
Timeout usage 0m elapsed (1%, 45m remaining)
Keepalive ✅ enabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | transient |
| Suggested recovery | Capture logs and context; retry once and escalate if the issue persists. |

@agents-workflows-bot

agents-workflows-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor
Keepalive Work Log (click to expand)
# Time (UTC) Agent Action Result Files Tasks Progress Commit Gate
0 2026-08-22 18:49:55 Codex wait (gate-cancelled-transient-transient) skipped 0 0/7 cancelled
1 2026-08-22 18:52:34 Codex run (bypass-rate-limit-gate) success 32 file(s) 0 0/7 cancelled
1 2026-08-22 18:58:16 Codex run (agent-run-skipped) skipped 0 0/7 success
2 2026-08-22 19:10:09 Codex run (bypass-rate-limit-gate) success 32 file(s) 0 0/8 cancelled
3 2026-08-22 19:13:43 Codex run (ready) success 32 file(s) 0 0/8 success
3 2026-08-22 19:21:00 Codex review (progress-review-4) skipped 0 0/8 success
3 2026-08-22 19:30:01 Codex wait (missing-agent-label-transient) skipped 0 0/8 success
3 2026-08-22 19:31:05 Codex wait (gate-pending-transient) skipped 0 0/8
4 2026-08-22 19:37:08 Codex run (ready) success 32 file(s) 0 0/8 success
4 2026-08-22 21:32:47 Codex review (progress-review-4) skipped 0 0/8 success

@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Runner dispatch state for codex on PR #3168. Do not edit.

@stranske-keepalive

stranske-keepalive Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

PR #3168 | Agent: Codex | Iteration 4/12

Current State

Metric Value
Iteration progress [###-------] 4/12
Action review (progress-review-4)
Gate success
Tasks 0/8 complete
Timeout 45 min (default)
Timeout usage 0m elapsed (2%, 45m remaining)
Keepalive ✅ enabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | unknown |
| Suggested recovery | Capture logs and context; retry once and escalate if the issue persists. |

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df89db7a58

ℹ️ 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".

Comment thread scripts/docs_drift_fix_agent.py
Comment thread scripts/sync_status_file_ignores.py
@agents-workflows-bot

agents-workflows-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

🤖 Bot Comment Handler

  • Agent: codex
  • Bot comments to address: 1

The agent has been assigned to this PR to address the bot review comments.

Instructions for agent

  1. Implement suggested fixes that improve the code
  2. Skip suggestions that don't apply (note why in your response)

The bot comment handler workflow has prepared context in the artifacts.

@stranske

Copy link
Copy Markdown
Owner Author

@codex review

Please re-review exact head 7f93d7a. The prior two threads are corrected with frozen legacy marker coverage and package-aware remote checks; the fallback P1 is also corrected by fail-closing status-ignore changes to full scope.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f93d7a90a

ℹ️ 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".

Comment thread scripts/sync_status_file_ignores.py
@stranske

Copy link
Copy Markdown
Owner Author

@codex review

Please re-review exact head 30eeda2. In addition to the frozen legacy body-hash renderer, apply now searches the exact prior target-truncated per-finding marker, with an end-to-end duplicate-prevention regression.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30eeda2fdb

ℹ️ 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".

Comment thread scripts/docs_drift_fix_agent.py Outdated
marker_indexes: dict[str, set[int]] = {legacy_marker: set(range(len(findings)))}
for index, finding in enumerate(findings):
marker_indexes.setdefault(markers[index], set()).add(index)
marker_indexes.setdefault(_legacy_v1_finding_marker(finding), set()).add(index)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict a legacy marker to its original finding

When two current semantic claims share the first 160 characters but differ afterward, _legacy_v1_finding_marker() returns the same marker for both, so this setdefault(...).add(index) associates one legacy marker with both indexes. The prior release also deduplicated such claims by that truncated target, meaning an existing issue carrying the marker contains only one of them; matching it here nevertheless marks both current findings covered and silently prevents an issue from being created for the second claim. Associate the legacy marker only with the representative that the legacy dedupe would have retained, rather than every full-identity finding with that truncated marker.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed on exact head 2e58f6d635289e707d4844e549732cde05ee82e8. Legacy target-truncated markers are now associated only with the representative retained by the legacy dedupe, while the second full-identity finding remains uncovered and gets its own issue. The end-to-end collision regression proves exactly one new issue is created for the second claim. Full suite: 4953 passed, 8 skipped, 3 expected xfails. Please re-evaluate; I am not resolving this thread.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Correction: the exact pushed head is 2e58f6d (the prior reply mistyped the suffix). The described legacy-marker fix and 4953-pass validation apply to this exact head. Please re-evaluate; I am not resolving this thread.

@stranske

Copy link
Copy Markdown
Owner Author

@codex review\n\nPlease review exact head 2e58f6d635289e707d4844e549732cde05ee82e8 after the two execution-path corrections. Validation: 139 focused tests and full suite 4953 passed, 8 skipped, 3 expected xfails; Ruff, Black, template sync/completeness/drift, script parity, and git diff checks pass.

@stranske

Copy link
Copy Markdown
Owner Author

Correction to the immediately prior review request: please review exact head 2e58f6d. The prior comment mistyped the SHA suffix; the validation evidence is unchanged.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e58f6d63d

ℹ️ 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".

Comment thread scripts/docs_drift_fix_agent.py Outdated
Comment on lines +629 to +630
if finding in legacy_representatives:
marker_indexes.setdefault(_legacy_v1_finding_marker(finding), set()).add(index)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Match legacy markers to the finding stored in the issue

When an older issue was created for claim B and a later scan adds claim A with the same 160-character prefix ahead of B, legacy_representatives selects A from the current plan even though the shared legacy marker belongs to B. The marker lookup then marks A covered and opens another issue for B, duplicating the existing repair while suppressing the new one. Fresh evidence in this head is that representative membership alone controls the association; although the lookup retrieves the legacy issue body, it never checks which full claim that body contains.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed on exact head e8e030c. A shared target-truncated marker now covers only current findings whose exact doc/kind/target/full-detail row is present in the retrieved legacy issue body; cached marker hits preserve the same body-bound check. The A-before-B regression proves an existing issue for B stays associated with B while exactly one new issue is created for A. Focused suite: 105 passed; full suite: 4954 passed, 8 skipped, 3 expected xfails. Please re-evaluate; I am not resolving this thread.

@stranske-keepalive

Copy link
Copy Markdown
Contributor

🛑 Progress Review (Round 4)

Recommendation: STOP
Alignment Score: 0.0/10

Feedback

Review your recent work against the acceptance criteria.


This review was triggered because the agent has been working for 4 rounds without completing any task checkboxes.
The review evaluates whether recent work is advancing toward the acceptance criteria.

@stranske-keepalive stranske-keepalive Bot removed the agent:codex Agent-created issues from Codex label Aug 22, 2026
@stranske

Copy link
Copy Markdown
Owner Author

@codex review\n\nPlease review exact head e8e030c after the legacy-marker association was bound to the actual finding row stored in the retrieved issue body. Validation: 105 focused tests and full suite 4954 passed, 8 skipped, 3 expected xfails; Ruff, Black, template sync/completeness/drift, source/template parity, and git diff checks pass.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: e8e030c2a2

ℹ️ 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".

@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: c20b8a2
Latest Runs: ⏳ pending — Gate
Required contexts: summary
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 76.47%
Baseline 85.00%
Delta -8.53%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske stranske added the agent:codex Agent-created issues from Codex label Aug 22, 2026
@stranske
stranske temporarily deployed to agent-high-privilege August 22, 2026 19:30 — with GitHub Actions Inactive
@stranske

Copy link
Copy Markdown
Owner Author

@codex Please provide a thread-specific disposition on exact head e8e030c for every remaining active thread: PRRT_kwDOQprj9M6bapqx (frozen legacy renderer), PRRT_kwDOQprj9M6bapqy (remote package-aware check), and PRRT_kwDOQprj9M6bauEA (local package-aware print block). Your exact-head review reported no major issues, the independent fallback approved, 105 focused and 4954 full-suite tests pass, and the handler run 32593907654 found the remote-check thread but did not clear it. If each criterion is satisfied, resolve or explicitly disposition your corresponding thread; otherwise name the exact unmet acceptance criterion and execution path for each thread ID. Do not edit or push the branch.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: e8e030c2a2

ℹ️ 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".

@stranske

stranske commented Aug 22, 2026

Copy link
Copy Markdown
Owner Author

Human authority decision brief — Workflows #3168

Target and exact action: On exact head e8e030c2a2638b12d561d0fe9e8a0438bcb8aa45, a repository maintainer must open each linked conversation and either choose Resolve conversation when the criterion is satisfied or reply on that thread with the exact remaining unmet execution-path criterion:

Observed evidence: The unchanged exact head remains open, ready, clean, mergeable, and not auto-merged. All three root findings have exact-head implementations and regression coverage. The focused source audit was rerun on the current checkout: 105 passed in 1.09s. Required Gate and security checks are passing. Exact-head Codex review and the independent fallback supplied no new criterion. The documented handler and thread-specific reviewer request completed without clearing these three conversations.

Affected surface and trust boundary: The changes affect docs-drift issue identity and legacy reuse, remote and local package-aware consumer .gitignore reconciliation, source/template parity, rollout scope selection, and their tests. The PR does not introduce a new elevated credential or workflow-permission boundary. After merge, however, this source controls fleet consumer automation and therefore requires the existing full canary and promotion gates.

Automation audit: Current code, diff, exact head, complete non-outdated review threads, PR comments, checks, labels, merge state, and the three targeted regression paths were re-read. No bounded code, documentation, test, routing, retry, rebase, or source-fix action remains for these criteria. Automation is explicitly forbidden to self-resolve reviewer conversations. The stale agent trigger labels were removed and auto-merge remains disabled.

Decision trade-off: Resolving the satisfied conversations authorizes the closer to perform the fresh zero-thread and required-check merge audit. Deferring keeps #3168, correction successor #3171, the three stable candidate PRs, and promotion held. If any criterion is still unmet, reply on its thread with the concrete execution path; the closer will implement and validate that bounded correction immediately.

Exact next automatic action: After all three conversations are resolved or corrected to zero active threads, the closer will re-read the unchanged head and required checks, merge #3168, update #3171 onto the new main and restart its full exact-head review window if its head changes, merge #3171 only after its own zero-thread gate, then dispatch one coalesced no-filter full Maint 68 canary and carry the exact plan through Maint 71 evidence, promotion, delivery reconciliation, and Health 83.

Authority classification: human-confirmed only because resolving or rejecting reviewer conversations requires reviewer or maintainer authority that this automation may not exercise. This is a narrow #3168 hold and does not pause unrelated fleet work.

@stranske-keepalive

Copy link
Copy Markdown
Contributor

🛑 Progress Review (Round 4)

Recommendation: STOP
Alignment Score: 0.0/10

Feedback

Review your recent work against the acceptance criteria.


This review was triggered because the agent has been working for 4 rounds without completing any task checkboxes.
The review evaluates whether recent work is advancing toward the acceptance criteria.

@stranske

Copy link
Copy Markdown
Owner Author

MERGE HOLD — closer-owned source rollout

Merge authority for exact head e8e030c2a2638b12d561d0fe9e8a0438bcb8aa45 belongs only to the sync/dependency closer. Do not merge, arm auto-merge, or add an automerge/agent trigger label.

Release conditions are all mandatory: the head remains unchanged; at least seven minutes have elapsed since its final push; required checks pass; active non-outdated review-thread count is exactly zero; #3168 is merged before ordered successor #3171; and the corrected source is propagated only through the coalesced full canary and promotion sequence.

Current hold: three active reviewer conversations. The exact maintainer action and post-resolution automation sequence are recorded in the human authority decision brief.

@stranske
stranske merged commit 607f2ab into main Aug 22, 2026
103 checks passed
@stranske
stranske deleted the automation/docs-drift-followup-3 branch August 22, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-high-privilege Grants elevated permissions for agent workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants