claude-dev-env 1.83.0 → 1.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_shared/pr-loop/audit-contract.md +24 -12
- package/_shared/pr-loop/scripts/_claude_permissions_common.py +16 -5
- package/_shared/pr-loop/scripts/code_rules_gate.py +2 -3
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/CLAUDE.md +1 -1
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/terminology_sweep_constants.py +8 -0
- package/_shared/pr-loop/scripts/reviews_disabled.py +2 -0
- package/_shared/pr-loop/scripts/terminology_sweep.py +85 -39
- package/_shared/pr-loop/scripts/tests/test__claude_permissions_common.py +212 -0
- package/_shared/pr-loop/scripts/tests/test_agent_config_carveout.py +18 -0
- package/_shared/pr-loop/scripts/tests/test_claude_permissions_common.py +18 -0
- package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +37 -0
- package/_shared/pr-loop/scripts/tests/test_reviews_disabled.py +14 -0
- package/_shared/pr-loop/scripts/tests/test_terminology_sweep.py +94 -4
- package/agents/clean-coder.md +3 -0
- package/audit-rubrics/category_rubrics/category-o-docstring-vs-impl-drift.md +1 -1
- package/bin/install.mjs +16 -8
- package/bin/install.test.mjs +17 -6
- package/commands/CLAUDE.md +0 -1
- package/docs/CODE_RULES.md +1 -1
- package/hooks/blocking/CLAUDE.md +0 -4
- package/hooks/blocking/claude_md_orphan_file_blocker.py +1 -1
- package/hooks/blocking/code_rules_constants_config.py +5 -0
- package/hooks/blocking/code_rules_docstrings.py +133 -19
- package/hooks/blocking/code_rules_enforcer.py +4 -0
- package/hooks/blocking/code_rules_imports_logging.py +10 -6
- package/hooks/blocking/code_rules_magic_values.py +5 -0
- package/hooks/blocking/code_rules_naming_collection.py +15 -8
- package/hooks/blocking/code_rules_paired_test.py +3 -2
- package/hooks/blocking/code_rules_shared.py +34 -0
- package/hooks/blocking/code_rules_string_magic.py +1 -1
- package/hooks/blocking/code_rules_unused_imports.py +2 -2
- package/hooks/blocking/duplicate_rmtree_helper_blocker.py +4 -4
- package/hooks/blocking/test_code_rules_enforcer_docstring_args_span_scope.py +29 -0
- package/hooks/blocking/test_code_rules_enforcer_docstring_prose_wall_illustration.py +197 -0
- package/hooks/blocking/test_code_rules_enforcer_docstring_runon_sentence.py +27 -0
- package/hooks/blocking/test_code_rules_enforcer_naive_datetime.py +24 -0
- package/hooks/blocking/test_code_rules_enforcer_split_constants_config.py +33 -0
- package/hooks/blocking/test_code_rules_enforcer_split_shared.py +23 -0
- package/hooks/blocking/test_code_rules_magic_values.py +54 -0
- package/hooks/blocking/test_duplicate_rmtree_helper_blocker.py +0 -6
- package/hooks/blocking/test_pr_converge_bugteam_enforcer_state_tolerance.py +184 -0
- package/hooks/blocking/test_shared_stdin_adoption.py +5 -30
- package/hooks/hooks_constants/CLAUDE.md +0 -3
- package/hooks/hooks_constants/blocking_check_limits.py +4 -0
- package/hooks/hooks_constants/code_rules_path_utils_constants.py +1 -1
- package/hooks/hooks_constants/duplicate_rmtree_helper_blocker_constants.py +0 -1
- package/hooks/hooks_constants/post_tool_use_dispatcher_constants.py +0 -5
- package/hooks/validation/post_tool_use_dispatcher.py +1 -1
- package/hooks/validation/test_post_tool_use_dispatcher.py +51 -35
- package/hooks/workflow/CLAUDE.md +2 -8
- package/package.json +1 -1
- package/rules/CLAUDE.md +1 -1
- package/rules/docstring-prose-matches-implementation.md +1 -1
- package/rules/env-var-table-code-drift.md +1 -1
- package/rules/package-inventory-stale-entry.md +1 -1
- package/rules/paired-test-coverage.md +1 -1
- package/rules/plain-illustrative-docstrings.md +35 -1
- package/skills/CLAUDE.md +6 -1
- package/skills/_shared/pr-loop/CLAUDE.md +1 -0
- package/skills/_shared/pr-loop/scripts/CLAUDE.md +1 -0
- package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/CLAUDE.md +1 -0
- package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/handoff_constants.py +45 -0
- package/skills/_shared/pr-loop/scripts/test_write_handoff.py +201 -0
- package/skills/_shared/pr-loop/scripts/write_handoff.py +309 -0
- package/skills/autoconverge/SKILL.md +82 -58
- package/skills/autoconverge/reference/closing-report.md +6 -6
- package/skills/autoconverge/reference/convergence.md +17 -15
- package/skills/autoconverge/reference/gotchas.md +6 -3
- package/skills/autoconverge/workflow/autoconverge_report_constants/render_report_constants.py +2 -9
- package/skills/autoconverge/workflow/converge.contract.test.mjs +87 -13
- package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +1 -1
- package/skills/autoconverge/workflow/converge.merge-conflict.test.mjs +16 -9
- package/skills/autoconverge/workflow/converge.mjs +71 -74
- package/skills/autoconverge/workflow/render_report.py +7 -11
- package/skills/bugteam/CLAUDE.md +1 -1
- package/skills/bugteam/PROMPTS.md +7 -6
- package/skills/bugteam/SKILL.md +25 -72
- package/skills/bugteam/reference/CLAUDE.md +1 -3
- package/skills/bugteam/reference/README.md +1 -1
- package/skills/bugteam/reference/audit-and-teammates.md +1 -1
- package/skills/bugteam/reference/obstacles/fix-publish-summary.md +1 -1
- package/skills/bugteam/reference/team-setup.md +8 -7
- package/skills/bugteam/scripts/CLAUDE.md +0 -6
- package/skills/bugteam/scripts/README.md +0 -4
- package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +0 -1
- package/skills/code/SKILL.md +2 -0
- package/skills/copilot-review/CLAUDE.md +1 -1
- package/skills/copilot-review/SKILL.md +25 -23
- package/skills/findbugs/CLAUDE.md +2 -2
- package/skills/findbugs/SKILL.md +22 -83
- package/skills/fixbugs/SKILL.md +2 -4
- package/skills/log-audit/CLAUDE.md +20 -0
- package/skills/log-audit/SKILL.md +68 -0
- package/skills/log-audit/reference/CLAUDE.md +9 -0
- package/skills/log-audit/reference/charter.md +52 -0
- package/skills/log-audit/scripts/CLAUDE.md +27 -0
- package/skills/log-audit/scripts/cluster_recurrences.py +261 -0
- package/skills/log-audit/scripts/collect_log_window.py +199 -0
- package/skills/log-audit/scripts/log_audit_constants/CLAUDE.md +12 -0
- package/skills/log-audit/scripts/log_audit_constants/cluster_recurrences_constants.py +23 -0
- package/skills/log-audit/scripts/log_audit_constants/collect_log_window_constants.py +24 -0
- package/skills/log-audit/scripts/log_audit_constants/mine_copilot_findings_constants.py +49 -0
- package/skills/log-audit/scripts/mine_copilot_findings.py +302 -0
- package/skills/log-audit/scripts/test_cluster_recurrences.py +160 -0
- package/skills/log-audit/scripts/test_collect_log_window.py +111 -0
- package/skills/log-audit/scripts/test_mine_copilot_findings.py +126 -0
- package/skills/monitor-open-prs/SKILL.md +2 -2
- package/skills/post-audit-findings/SKILL.md +84 -0
- package/skills/pr-converge/CLAUDE.md +2 -0
- package/skills/pr-converge/SKILL.md +99 -60
- package/skills/pr-converge/reference/CLAUDE.md +1 -1
- package/skills/pr-converge/reference/convergence-gates.md +16 -19
- package/skills/pr-converge/reference/examples.md +5 -5
- package/skills/pr-converge/reference/fix-protocol.md +16 -43
- package/skills/pr-converge/reference/obstacles/fix-publish-summary.md +1 -1
- package/skills/pr-converge/reference/per-tick.md +24 -45
- package/skills/pr-converge/reference/state-schema.md +27 -0
- package/skills/pr-converge/scripts/README.md +3 -5
- package/skills/pr-fix-protocol/SKILL.md +70 -0
- package/skills/pr-loop-lifecycle/SKILL.md +73 -0
- package/skills/{bugteam → pr-loop-lifecycle}/reference/teardown-publish-permissions.md +22 -24
- package/skills/pr-scope-resolve/SKILL.md +48 -0
- package/skills/qbug/CLAUDE.md +4 -4
- package/skills/qbug/SKILL.md +46 -144
- package/skills/qbug/test_qbug_skill_audit_schema.py +2 -2
- package/skills/qbug/test_qbug_skill_post_fix_audit.py +1 -1
- package/skills/reviewer-gates/SKILL.md +96 -0
- package/skills/session-log/CLAUDE.md +7 -7
- package/skills/session-log/SKILL.md +27 -44
- package/skills/test_markdown_link_integrity.py +103 -0
- package/commands/doc-gist.md +0 -16
- package/hooks/blocking/_md_to_html_blocker_test_support.py +0 -65
- package/hooks/blocking/conftest.py +0 -30
- package/hooks/blocking/md_path_exemptions.py +0 -224
- package/hooks/blocking/md_to_html_blocker.py +0 -155
- package/hooks/blocking/test_md_to_html_blocker_exemptions.py +0 -434
- package/hooks/blocking/test_md_to_html_blocker_extensions.py +0 -157
- package/hooks/blocking/test_md_to_html_blocker_path_resolution.py +0 -336
- package/hooks/hooks_constants/doc_gist_auto_publish_constants.py +0 -18
- package/hooks/hooks_constants/html_companion_constants.py +0 -20
- package/hooks/hooks_constants/md_to_html_blocker_constants.py +0 -76
- package/hooks/hooks_constants/test_md_to_html_blocker_constants.py +0 -125
- package/hooks/workflow/doc_gist_auto_publish.py +0 -144
- package/hooks/workflow/md_to_html_companion.py +0 -358
- package/hooks/workflow/test_doc_gist_auto_publish.py +0 -117
- package/hooks/workflow/test_md_to_html_companion.py +0 -613
- package/skills/bugteam/reference/audit-contract.md +0 -163
- package/skills/bugteam/scripts/_bugteam_permissions_common.py +0 -455
- package/skills/bugteam/scripts/bugteam_scripts_constants/claude_permissions_common_constants.py +0 -69
- package/skills/bugteam/scripts/grant_project_claude_permissions.py +0 -280
- package/skills/bugteam/scripts/revoke_project_claude_permissions.py +0 -266
- package/skills/bugteam/scripts/test__bugteam_permissions_common.py +0 -160
- package/skills/bugteam/scripts/test_agent_config_carveout.py +0 -356
- package/skills/bugteam/scripts/test_bugteam_permissions_common.py +0 -140
- package/skills/doc-gist/CLAUDE.md +0 -25
- package/skills/doc-gist/SKILL.md +0 -97
- package/skills/doc-gist/references/CLAUDE.md +0 -9
- package/skills/doc-gist/references/examples/01-exploration-code-approaches.html +0 -453
- package/skills/doc-gist/references/examples/02-exploration-visual-designs.html +0 -515
- package/skills/doc-gist/references/examples/03-code-review-pr.html +0 -638
- package/skills/doc-gist/references/examples/04-code-understanding.html +0 -491
- package/skills/doc-gist/references/examples/05-design-system.html +0 -629
- package/skills/doc-gist/references/examples/06-component-variants.html +0 -605
- package/skills/doc-gist/references/examples/07-prototype-animation.html +0 -455
- package/skills/doc-gist/references/examples/08-prototype-interaction.html +0 -396
- package/skills/doc-gist/references/examples/09-slide-deck.html +0 -592
- package/skills/doc-gist/references/examples/10-svg-illustrations.html +0 -492
- package/skills/doc-gist/references/examples/11-status-report.html +0 -528
- package/skills/doc-gist/references/examples/12-incident-report.html +0 -596
- package/skills/doc-gist/references/examples/13-flowchart-diagram.html +0 -395
- package/skills/doc-gist/references/examples/14-research-feature-explainer.html +0 -381
- package/skills/doc-gist/references/examples/15-research-concept-explainer.html +0 -368
- package/skills/doc-gist/references/examples/16-implementation-plan.html +0 -702
- package/skills/doc-gist/references/examples/17-pr-writeup.html +0 -595
- package/skills/doc-gist/references/examples/18-editor-triage-board.html +0 -573
- package/skills/doc-gist/references/examples/19-editor-feature-flags.html +0 -663
- package/skills/doc-gist/references/examples/20-editor-prompt-tuner.html +0 -722
- package/skills/doc-gist/references/examples/21-decision-signoff.html +0 -546
- package/skills/doc-gist/references/examples/CLAUDE.md +0 -25
- package/skills/doc-gist/references/examples/README.md +0 -5
- package/skills/doc-gist/scripts/CLAUDE.md +0 -27
- package/skills/doc-gist/scripts/doc_gist_scripts_constants/CLAUDE.md +0 -10
- package/skills/doc-gist/scripts/doc_gist_scripts_constants/gist_upload_constants.py +0 -16
- package/skills/doc-gist/scripts/gist_upload.py +0 -177
- package/skills/doc-gist/scripts/test_gist_upload.py +0 -51
- /package/skills/{doc-gist/scripts/doc_gist_scripts_constants → log-audit/scripts/log_audit_constants}/__init__.py +0 -0
|
@@ -83,31 +83,16 @@ PR's owner.
|
|
|
83
83
|
example, `claude-code-config` while the PR lives in `llm-settings`) or in no
|
|
84
84
|
git checkout at all cannot continue.
|
|
85
85
|
|
|
86
|
-
4. **Grant project permissions.**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Continue once the grant lands. A user who wants future runs to skip this
|
|
97
|
-
prompt can add a standing Bash permission allow-rule for that script in their
|
|
98
|
-
settings.
|
|
99
|
-
|
|
100
|
-
5. **Copilot quota pre-check.** Before the `Workflow` call, run once:
|
|
101
|
-
`python "$HOME/.claude/_shared/pr-loop/scripts/copilot_quota.py"`
|
|
102
|
-
It reads the account's remaining Copilot premium-request quota via
|
|
103
|
-
`gh api copilot_internal/user` and prints one line — log that line. Exit 0
|
|
104
|
-
means Copilot has quota to run, so pass `copilotDisabled: false`. Any non-zero
|
|
105
|
-
exit means skip Copilot for this run — the account is out of quota, the quota
|
|
106
|
-
API or account access is down, or no account is set — so pass
|
|
107
|
-
`copilotDisabled: true`; the workflow then skips the Copilot gate with no agent
|
|
108
|
-
spawned. The account comes from the `COPILOT_QUOTA_ACCOUNT` environment
|
|
109
|
-
variable or a git-ignored `.env` file, and the no-account line names the exact
|
|
110
|
-
`.env` path and key to set.
|
|
86
|
+
4. **Grant project permissions.** Apply the `pr-loop-lifecycle` skill's Open
|
|
87
|
+
section (`../pr-loop-lifecycle/SKILL.md`) — the grant command
|
|
88
|
+
(`grant_project_claude_permissions.py`) and the auto-mode `AskUserQuestion`
|
|
89
|
+
escalation for a blocked grant both live there.
|
|
90
|
+
|
|
91
|
+
5. **Copilot quota pre-check.** Before the `Workflow` call, apply the
|
|
92
|
+
`reviewer-gates` skill's Copilot quota gate (`../reviewer-gates/SKILL.md`)
|
|
93
|
+
once. Exit 0 maps to `copilotDisabled: false` in the Workflow call; any
|
|
94
|
+
non-zero exit maps to `copilotDisabled: true`, and the workflow then skips
|
|
95
|
+
the Copilot gate with no agent spawned.
|
|
111
96
|
|
|
112
97
|
## Run the workflow
|
|
113
98
|
|
|
@@ -130,6 +115,19 @@ and `false` when it exits 0; on `true` the workflow skips the Copilot gate with
|
|
|
130
115
|
no agent spawned. The workflow runs in the background and notifies this session
|
|
131
116
|
on completion. Watch live progress with `/workflows`.
|
|
132
117
|
|
|
118
|
+
The moment the `Workflow` call returns its run id, write the durable handoff so a
|
|
119
|
+
fresh session can resume the same run:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
python "$HOME/.claude/skills/_shared/pr-loop/scripts/write_handoff.py" \
|
|
123
|
+
--pr-number <N> --head-ref <branch> --phase workflow \
|
|
124
|
+
--resume-command "Workflow({scriptPath, resumeFromRunId: '<runId>'})" \
|
|
125
|
+
--run-id <runId>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Write it again when the result lands, so the handoff carries the final run id and
|
|
129
|
+
names the teardown phase the fresh session picks up from.
|
|
130
|
+
|
|
133
131
|
The workflow returns
|
|
134
132
|
`{ converged, rounds, finalSha, blocker, standardsNote, copilotNote, reuseNote, deferredPrs }`.
|
|
135
133
|
`deferredPrs` is the list of draft environment-hardening PRs the standards-deferral
|
|
@@ -149,13 +147,37 @@ returns `blocker: "budget"` with the run id; resume with
|
|
|
149
147
|
the journal. Never start a round the budget cannot finish: a half-run
|
|
150
148
|
round records nothing resumable and replays dirty.
|
|
151
149
|
|
|
150
|
+
On a `blocker: "budget"` return, write the durable handoff with the run id and the
|
|
151
|
+
`Workflow({scriptPath, resumeFromRunId})` resume command before stopping, so a
|
|
152
|
+
fresh session resumes the paced run without the stopped session's transcript.
|
|
153
|
+
|
|
152
154
|
## Teardown (on workflow completion)
|
|
153
155
|
|
|
156
|
+
Teardown runs as an ordered checkpoint list. After each checkpoint finishes,
|
|
157
|
+
re-write the durable handoff with `--phase teardown`, the run id, and the
|
|
158
|
+
checkpoints done so far, so a fresh session that resumes reads `handoff.json`
|
|
159
|
+
`completed_steps` and skips the checkpoints already done:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
python "$HOME/.claude/skills/_shared/pr-loop/scripts/write_handoff.py" \
|
|
163
|
+
--pr-number <N> --head-ref <branch> --phase teardown \
|
|
164
|
+
--resume-command "/autoconverge <PR URL>" \
|
|
165
|
+
--run-id <runId> \
|
|
166
|
+
--completed-steps "<checkpoints done so far>"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The checkpoints run in this order: `report`, `close`. Write the
|
|
170
|
+
handoff after each one finishes.
|
|
171
|
+
|
|
172
|
+
On teardown entry, when `~/.claude/runtime/pr-loop/bugteam-pr-<N>/handoff.json`
|
|
173
|
+
exists, read its `completed_steps` and skip any checkpoint the list already
|
|
174
|
+
names, so a resumed run performs only the checkpoints left.
|
|
175
|
+
|
|
154
176
|
1. **When `converged` is true — build and publish the closing report.**
|
|
155
|
-
Skip this entire step (report,
|
|
156
|
-
returned a non-null `blocker`. Per-round live-dashboard refresh is out of
|
|
157
|
-
here; this step builds the one-shot closing report and the seam (marker
|
|
158
|
-
|
|
177
|
+
Skip this entire step (report, artifact publish, comment, Chrome open) when the
|
|
178
|
+
workflow returned a non-null `blocker`. Per-round live-dashboard refresh is out of
|
|
179
|
+
scope here; this step builds the one-shot closing report and the seam (marker
|
|
180
|
+
comment + artifact URL) a future live-dashboard reuses.
|
|
159
181
|
|
|
160
182
|
a. **Resolve a seed journal path.** Glob
|
|
161
183
|
`~/.claude/projects/**/workflows/wf_<runId>.json` (where `runId` is the run id
|
|
@@ -194,21 +216,16 @@ round records nothing resumable and replays dirty.
|
|
|
194
216
|
Use the `combinedJournal`, `finalSha`, and `roundCount` from step b. Capture the
|
|
195
217
|
output path from stdout.
|
|
196
218
|
|
|
197
|
-
e. **Publish
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
--no-open \
|
|
203
|
-
--description "autoconverge report PR #<n>"
|
|
204
|
-
```
|
|
205
|
-
Capture the htmlpreview URL from stdout. The gist is secret by default; pass
|
|
206
|
-
no public flag.
|
|
219
|
+
e. **Publish via the Artifact tool.** Load the `artifact-design` skill first, then
|
|
220
|
+
call `Artifact` with `file_path` set to the report path from step d, `favicon`
|
|
221
|
+
set to the fixed autoconverge favicon `✅` (keep this favicon stable across
|
|
222
|
+
every autoconverge report — never swap it per run), and `description` set to
|
|
223
|
+
a one-sentence subtitle naming the PR. Capture the returned URL.
|
|
207
224
|
|
|
208
225
|
f. **Post one idempotent PR comment.** List the PR's issue comments; if one
|
|
209
226
|
carries the marker `<!-- autoconverge-report -->`, edit it in place, otherwise
|
|
210
227
|
create a new one. The body begins with `<!-- autoconverge-report -->`, then
|
|
211
|
-
the
|
|
228
|
+
the artifact URL, then a plain-language summary that mirrors the report:
|
|
212
229
|
lead with the one-sentence `verdictLine`; then the plain Problem and Fix
|
|
213
230
|
sentences (`prProblem`, `prFix`); then the issue-class list — one bullet per
|
|
214
231
|
class as `plainName (×count, status)`. Place the raw finding list as
|
|
@@ -219,21 +236,25 @@ round records nothing resumable and replays dirty.
|
|
|
219
236
|
GitHub MCP `add_issue_comment` tool (body as a structured parameter, no
|
|
220
237
|
`--body` flag).
|
|
221
238
|
|
|
222
|
-
g. **Open the report in Chrome.**
|
|
239
|
+
g. **Open the published report in Chrome.** Use the artifact URL captured in
|
|
240
|
+
step e.
|
|
223
241
|
```
|
|
224
|
-
Start-Process chrome -ArgumentList '--new-window', '<
|
|
242
|
+
Start-Process chrome -ArgumentList '--new-window', '<artifact URL>'
|
|
225
243
|
```
|
|
226
|
-
|
|
244
|
+
Skip a missing Chrome without aborting the rest of teardown.
|
|
227
245
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
[`bugteam/reference/teardown-publish-permissions.md` § Step 4 and § Step 4.5](../bugteam/reference/teardown-publish-permissions.md).
|
|
231
|
-
The workflow already marked the PR ready.
|
|
246
|
+
After the report is published, write the handoff with
|
|
247
|
+
`--completed-steps "report"`.
|
|
232
248
|
|
|
233
|
-
|
|
234
|
-
|
|
249
|
+
2. **Close the run.** Apply the `pr-loop-lifecycle` skill's Close section
|
|
250
|
+
(`../pr-loop-lifecycle/SKILL.md`): when `converged` is true, rewrite the PR
|
|
251
|
+
description and clean the working tree — see
|
|
252
|
+
[`pr-loop-lifecycle/reference/teardown-publish-permissions.md` § Clean working tree and § Publish the final PR description](../pr-loop-lifecycle/reference/teardown-publish-permissions.md);
|
|
253
|
+
the workflow already marked the PR ready. The permission revoke always runs,
|
|
254
|
+
including on a blocker exit. Write the handoff with
|
|
255
|
+
`--completed-steps "report,close"`.
|
|
235
256
|
|
|
236
|
-
|
|
257
|
+
3. **Print the final report:**
|
|
237
258
|
|
|
238
259
|
```
|
|
239
260
|
/autoconverge exit: <converged | blocked>
|
|
@@ -304,13 +325,14 @@ matches.
|
|
|
304
325
|
|
|
305
326
|
- **Converge:** `parallel([Bugbot lens, code-review lens, bug-audit lens])` on
|
|
306
327
|
the current HEAD, full `origin/main...HEAD` diff. Dedup findings; one
|
|
307
|
-
`clean-coder` applies
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
328
|
+
`clean-coder` applies the round's fixes per the `pr-fix-protocol` skill
|
|
329
|
+
(`../pr-fix-protocol/SKILL.md`) — fix, reply, resolve — landing every fix in
|
|
330
|
+
one commit per round, which the workflow journal records; re-verify next
|
|
331
|
+
round on the new HEAD. Every edit step ends with a pre-commit gate check:
|
|
332
|
+
before its turn ends, the fixer dry-runs the CODE_RULES commit gate
|
|
333
|
+
(`code_rules_gate.py --staged`) and keeps fixing until that gate would accept
|
|
334
|
+
the commit — it makes no commit itself. When all three are clean on a stable
|
|
335
|
+
HEAD, post the CLEAN bugteam audit artifact.
|
|
314
336
|
A round whose findings are ALL code-standard violations (pure CODE_RULES/style,
|
|
315
337
|
no behavioral impact) passes for convergence purposes: the workflow files a
|
|
316
338
|
follow-up issue listing the findings, opens a draft environment-hardening PR
|
|
@@ -404,7 +426,9 @@ top-level `converged` is true only when every PR converged.
|
|
|
404
426
|
|
|
405
427
|
Run the single-PR [Teardown](#teardown-on-workflow-completion) once per entry in
|
|
406
428
|
`results`, using that PR's `owner`, `repo`, `prNumber`, and `finalSha`, and its
|
|
407
|
-
own worktree as the working directory.
|
|
429
|
+
own worktree as the working directory. Write one durable handoff per PR entry —
|
|
430
|
+
each with that PR's own `--pr-number` — so a fresh session can resume any PR on
|
|
431
|
+
its own. Build and publish a PR's closing report
|
|
408
432
|
only for a PR whose `converged` is true; for a PR that returned a blocker, skip
|
|
409
433
|
its report and carry the blocker into the final summary. Revoke project
|
|
410
434
|
permissions once per repository after every PR's teardown. Then print one summary
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Closing Report
|
|
2
2
|
|
|
3
|
-
When an autoconverge run converges (the workflow returns `converged: true`), the main session generates a convergence insights HTML report and publishes it
|
|
3
|
+
When an autoconverge run converges (the workflow returns `converged: true`), the main session generates a convergence insights HTML report and publishes it with the `Artifact` tool, with an idempotent PR comment linking to it.
|
|
4
4
|
|
|
5
5
|
## Data source
|
|
6
6
|
|
|
@@ -73,14 +73,14 @@ Counting is deterministic: `generated_date` comes from the journal `timestamp`,
|
|
|
73
73
|
|
|
74
74
|
After rendering, the main session:
|
|
75
75
|
|
|
76
|
-
1. **
|
|
77
|
-
2. **Posts one idempotent PR comment** marked with `<!-- autoconverge-report -->`. If a comment with that marker already exists on the PR, it is edited in place; otherwise a new comment is created. The body leads with the
|
|
78
|
-
3. **Opens the report** with `Start-Process chrome -ArgumentList '--new-window', '<
|
|
76
|
+
1. **Publishes the HTML with the Artifact tool.** Loads the `artifact-design` skill first, then calls `Artifact` with `file_path` set to the rendered report, `favicon` set to the fixed autoconverge favicon `✅` (kept stable across every autoconverge report), and `description` naming the PR. Captures the returned URL.
|
|
77
|
+
2. **Posts one idempotent PR comment** marked with `<!-- autoconverge-report -->`. If a comment with that marker already exists on the PR, it is edited in place; otherwise a new comment is created. The body leads with the artifact URL, then the one-sentence `verdictLine`, then the plain Problem and Fix sentences (`prProblem`, `prFix`), then the issue-class list — one bullet per class as `plainName (×count, status)` — and closes with the full finding list (`file:line — P# — title`) inside a collapsed `<details>` block. Write the body to a BOM-free temp file and pass `--body-file` to `gh issue comment` (never `--body`), or use the GitHub MCP `add_issue_comment` tool.
|
|
78
|
+
3. **Opens the published report** with `Start-Process chrome -ArgumentList '--new-window', '<artifact URL>'`, using the artifact URL captured in step 1. A missing Chrome does not abort teardown.
|
|
79
79
|
|
|
80
80
|
## Live-dashboard seam
|
|
81
81
|
|
|
82
|
-
The marker comment and
|
|
82
|
+
The marker comment and artifact together form a seam for future per-round dashboard refreshes: a live-dashboard step re-renders with the same `render_report_html` function (pure, no side effects), calls `Artifact` again on the same `file_path` to redeploy to the same URL, and edits the same marker comment. That per-round refresh path is out of scope here; this document describes the one-shot closing report only.
|
|
83
83
|
|
|
84
84
|
## Scope
|
|
85
85
|
|
|
86
|
-
The closing report runs only when `converged === true`. On a blocker exit (`blocker: "budget"` or similar), the report,
|
|
86
|
+
The closing report runs only when `converged === true`. On a blocker exit (`blocker: "budget"` or similar), the report, artifact publish, comment, and Chrome open are all skipped.
|
|
@@ -55,24 +55,25 @@ tracks CONVERGE passes only and is never the cap.
|
|
|
55
55
|
- **Code-review lens** — a correctness-focused review pass (`code-quality-agent`)
|
|
56
56
|
that reports findings without editing.
|
|
57
57
|
- **Bug-audit lens** — the bug-audit (`code-quality-agent`) applying the
|
|
58
|
-
shared A–P rubric from `
|
|
58
|
+
shared A–P rubric from `_shared/pr-loop/audit-contract.md`, reporting
|
|
59
59
|
findings without editing.
|
|
60
60
|
3. Dedup findings across the three lenses by file, line, and title. A collision
|
|
61
61
|
keeps the most severe duplicate's severity (P0 > P1 > P2), unions the detail
|
|
62
62
|
text, and collects every distinct bot thread id so the fix lens resolves all
|
|
63
63
|
colliding threads.
|
|
64
|
-
4. **Any findings** → one `clean-coder` applies every fix
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
4. **Any findings** → one `clean-coder` applies every fix per the
|
|
65
|
+
`pr-fix-protocol` skill (`../../pr-fix-protocol/SKILL.md`): a single
|
|
66
|
+
test-first commit, a push, then a reply and resolve on each finding that
|
|
67
|
+
carries a GitHub review thread. Before its turn ends, the edit step dry-runs
|
|
68
|
+
the CODE_RULES commit gate (`code_rules_gate.py --staged`) over its staged
|
|
68
69
|
changes and keeps fixing until that gate would accept the commit, so the
|
|
69
|
-
later commit step never hits a gate rejection. A round progresses when the
|
|
70
|
-
moves HEAD, or when every finding was already
|
|
71
|
-
needed yet each finding thread is still
|
|
72
|
-
`resolvedWithoutCommit` and the run
|
|
73
|
-
round whose fix lens reports neither
|
|
74
|
-
thread-resolution ends the run with a
|
|
75
|
-
re-verifies on the current HEAD.
|
|
70
|
+
later commit step never hits a gate rejection. A round progresses when the
|
|
71
|
+
fix lens lands a push that moves HEAD, or when every finding was already
|
|
72
|
+
addressed so no code change is needed yet each finding thread is still
|
|
73
|
+
resolved (the fix lens reports `resolvedWithoutCommit` and the run
|
|
74
|
+
re-converges on the unchanged HEAD). A round whose fix lens reports neither
|
|
75
|
+
a moved-HEAD push nor a full thread-resolution ends the run with a
|
|
76
|
+
fix-stalled blocker. The next round re-verifies on the current HEAD.
|
|
76
77
|
5. **Zero findings on a stable HEAD** → post the CLEAN bugteam audit artifact
|
|
77
78
|
for that HEAD, then move to the Copilot gate.
|
|
78
79
|
|
|
@@ -112,9 +113,10 @@ the current HEAD:
|
|
|
112
113
|
4. The Copilot review on HEAD is clean or approved (bypassed when Copilot is down
|
|
113
114
|
or out of quota this run).
|
|
114
115
|
5. Zero unresolved bot review threads anywhere on the PR — counting Cursor,
|
|
115
|
-
Claude, and Copilot authored threads
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
Claude, and Copilot authored threads. The filter is purely
|
|
117
|
+
`isResolved == false`; `isOutdated` is informational, and the fix lens
|
|
118
|
+
verifies each outdated thread against current HEAD like any other (the
|
|
119
|
+
`pr-fix-protocol` skill's unresolved-thread sweep).
|
|
118
120
|
6. The PR is mergeable (`mergeable` true and `mergeable_state` clean).
|
|
119
121
|
7. No requested reviewers are still pending (bypassed when Copilot is down or out
|
|
120
122
|
of quota this run).
|
|
@@ -21,9 +21,12 @@ fails in a new way.
|
|
|
21
21
|
- **Fetch origin/main once before the parallel lenses.** The code-review and
|
|
22
22
|
bug-audit lenses both diff against `origin/main`. Concurrent `git fetch` calls
|
|
23
23
|
contend on the worktree `.git` lock and fail intermittently, so the workflow
|
|
24
|
-
runs a single serial `git fetch origin main`
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
runs a single serial `git fetch origin main` inside the merged `preflight-git`
|
|
25
|
+
step — the one git-utility agent that also resolves the PR HEAD SHA and probes
|
|
26
|
+
mergeability — and the parallel lenses run no git fetch of their own; they
|
|
27
|
+
diff against the already-current ref. The workflow threads the resolved HEAD
|
|
28
|
+
through the rounds and re-runs `preflight-git` only after a push or rebase
|
|
29
|
+
invalidates it, so a round on an unchanged HEAD spawns no git agent at all.
|
|
27
30
|
|
|
28
31
|
- **The CLEAN bugteam artifact is HEAD-specific.** `check_convergence.py` reads
|
|
29
32
|
the bugteam review on the current HEAD. Any push moves HEAD and invalidates a
|
package/skills/autoconverge/workflow/autoconverge_report_constants/render_report_constants.py
CHANGED
|
@@ -154,16 +154,9 @@ Write so a non-programmer understands every line. The reader has never seen the
|
|
|
154
154
|
|
|
155
155
|
Return strictly a JSON object with keys prProblem, prFix, problemScenes, fixScenes, verdictLine, and issueClasses."""
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
HTML_HEAD_TEMPLATE = """\
|
|
160
|
-
<head>
|
|
161
|
-
<meta charset="utf-8">
|
|
162
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
157
|
+
HTML_TITLE_AND_STYLE_TEMPLATE = """\
|
|
163
158
|
<title>PR #{pr_number} Convergence Summary</title>
|
|
164
|
-
|
|
165
|
-
{style_block}
|
|
166
|
-
</head>"""
|
|
159
|
+
{style_block}"""
|
|
167
160
|
|
|
168
161
|
HTML_STYLE_BLOCK = """\
|
|
169
162
|
<style>
|
|
@@ -44,26 +44,37 @@ test('bug-audit lens prompt no longer instructs a per-lens git fetch', () => {
|
|
|
44
44
|
assert.doesNotMatch(lensPromptBody('runAuditLens'), /git fetch origin main/);
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
test('
|
|
48
|
-
assert.ok(convergeSource.includes("runGitTask('
|
|
49
|
-
const
|
|
47
|
+
test('the merged preflight-git task fetches origin/main once before the parallel lenses', () => {
|
|
48
|
+
assert.ok(convergeSource.includes("runGitTask('preflight-git')"));
|
|
49
|
+
const preflightCallIndex = convergeSource.indexOf("runGitTask('preflight-git')");
|
|
50
50
|
const parallelLensIndex = convergeSource.indexOf('const lenses = await parallel(');
|
|
51
|
-
assert.notEqual(
|
|
51
|
+
assert.notEqual(preflightCallIndex, -1, 'expected the merged preflight to be invoked');
|
|
52
52
|
assert.notEqual(parallelLensIndex, -1, 'expected the parallel lens block to exist');
|
|
53
53
|
assert.ok(
|
|
54
|
-
|
|
55
|
-
'expected the
|
|
54
|
+
preflightCallIndex < parallelLensIndex,
|
|
55
|
+
'expected the merged preflight to run before the parallel lenses spawn',
|
|
56
56
|
);
|
|
57
|
+
const gitTaskBody = functionSource('runGitTask');
|
|
58
|
+
assert.match(gitTaskBody, /git fetch origin main/, 'expected the merged task to carry the base-ref fetch');
|
|
59
|
+
assert.match(gitTaskBody, /--jq \.head\.sha/, 'expected the merged task to resolve the PR HEAD SHA');
|
|
60
|
+
assert.match(gitTaskBody, /PREFLIGHT_GIT_SCHEMA/, 'expected the merged task to return the {sha, conflicting, fetched} schema');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('the merged preflight-git agent runs on haiku at low effort', () => {
|
|
64
|
+
const gitTaskBody = functionSource('runGitTask');
|
|
65
|
+
assert.match(gitTaskBody, /model: 'haiku'/, 'expected the git-utility agent to run on the cheapest model');
|
|
66
|
+
assert.match(gitTaskBody, /effort: 'low'/, 'expected the git-utility agent to run at low effort');
|
|
57
67
|
});
|
|
58
68
|
|
|
59
69
|
test('the CONVERGE round spawns a single shared reviewer-availability probe before the parallel lenses', () => {
|
|
60
|
-
const
|
|
70
|
+
const convergeBranchStart = convergeSource.indexOf("if (phase === 'CONVERGE')");
|
|
71
|
+
const refreshCallIndex = convergeSource.indexOf("runGitTask('preflight-git')", convergeBranchStart);
|
|
61
72
|
const probeCallIndex = convergeSource.indexOf('reviewerAvailability = await runReviewerAvailabilityCheck()');
|
|
62
73
|
const parallelLensIndex = convergeSource.indexOf('const lenses = await parallel(');
|
|
63
74
|
assert.notEqual(probeCallIndex, -1, 'expected the CONVERGE round to spawn the shared reviewer-availability probe');
|
|
64
75
|
assert.ok(
|
|
65
|
-
|
|
66
|
-
'expected the probe to run after the round
|
|
76
|
+
refreshCallIndex < probeCallIndex && probeCallIndex < parallelLensIndex,
|
|
77
|
+
'expected the probe to run after the round head refresh and before the parallel lenses spawn',
|
|
67
78
|
);
|
|
68
79
|
const probeBody = functionSource('runReviewerAvailabilityCheck');
|
|
69
80
|
assert.match(probeBody, /reviewer_availability\.py/);
|
|
@@ -247,11 +258,74 @@ test('the COPILOT fix branch does not re-assign head from the fix before re-conv
|
|
|
247
258
|
);
|
|
248
259
|
});
|
|
249
260
|
|
|
250
|
-
test('the CONVERGE branch
|
|
261
|
+
test('the CONVERGE branch refreshes HEAD via the merged preflight-git task only when the threaded head is invalidated', () => {
|
|
251
262
|
const convergeBranchStart = convergeSource.indexOf("if (phase === 'CONVERGE')");
|
|
252
263
|
assert.notEqual(convergeBranchStart, -1, 'expected the CONVERGE branch to exist');
|
|
253
|
-
const
|
|
254
|
-
|
|
264
|
+
const invalidGuardIndex = convergeSource.indexOf('if (!isResolvedHeadUsable(head))', convergeBranchStart);
|
|
265
|
+
const headRefreshCallIndex = convergeSource.indexOf("runGitTask('preflight-git')", convergeBranchStart);
|
|
266
|
+
assert.notEqual(invalidGuardIndex, -1, 'expected CONVERGE to gate the refresh on an invalidated head');
|
|
267
|
+
assert.notEqual(headRefreshCallIndex, -1, 'expected CONVERGE to refresh HEAD via the merged preflight-git task');
|
|
268
|
+
assert.ok(
|
|
269
|
+
invalidGuardIndex < headRefreshCallIndex,
|
|
270
|
+
'expected the invalidated-head guard to precede the merged refresh so a valid threaded head spawns no git agent',
|
|
271
|
+
);
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
test('each fix push, each lens-retry, and the convergence repair invalidate the threaded head so the next CONVERGE entry refreshes it', () => {
|
|
275
|
+
const invalidationMatches = convergeSource.match(/^ +head = null$/gm) || [];
|
|
276
|
+
assert.equal(
|
|
277
|
+
invalidationMatches.length,
|
|
278
|
+
5,
|
|
279
|
+
'expected head invalidation after the CONVERGE fix push, the COPILOT fix push, the convergence repair, the all-lenses-dead retry, and the not-clean-no-findings retry',
|
|
280
|
+
);
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
function convergeRetryBranch(guardMarker) {
|
|
284
|
+
const guardIndex = convergeSource.indexOf(guardMarker);
|
|
285
|
+
assert.notEqual(guardIndex, -1, `expected the ${guardMarker} retry branch to exist`);
|
|
286
|
+
const continueIndex = convergeSource.indexOf('continue', guardIndex);
|
|
287
|
+
assert.notEqual(continueIndex, -1, `expected a continue statement to close the ${guardMarker} branch`);
|
|
288
|
+
return convergeSource.slice(guardIndex, continueIndex + 'continue'.length);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
test('the all-lenses-dead retry invalidates the threaded head so the next round re-fetches origin/main before spawning lenses', () => {
|
|
292
|
+
const branch = convergeRetryBranch('if (roundOutcome.allLensesDead) {');
|
|
293
|
+
const headNullIndex = branch.indexOf('head = null');
|
|
294
|
+
assert.notEqual(
|
|
295
|
+
headNullIndex,
|
|
296
|
+
-1,
|
|
297
|
+
'expected the all-lenses-dead retry to null head so the next round re-enters preflight-git — otherwise the lenses are told origin/main was fetched this round when no fetch ran',
|
|
298
|
+
);
|
|
299
|
+
assert.ok(
|
|
300
|
+
headNullIndex < branch.indexOf('continue'),
|
|
301
|
+
'expected head to be invalidated before the retry continues to the next round',
|
|
302
|
+
);
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
test('the not-clean-no-findings retry invalidates the threaded head so the next round re-fetches origin/main before spawning lenses', () => {
|
|
306
|
+
const branch = convergeRetryBranch('if (!roundOutcome.roundClean) {');
|
|
307
|
+
const headNullIndex = branch.indexOf('head = null');
|
|
308
|
+
assert.notEqual(
|
|
309
|
+
headNullIndex,
|
|
310
|
+
-1,
|
|
311
|
+
'expected the not-clean-no-findings retry to null head so the next round re-enters preflight-git — otherwise the lenses are told origin/main was fetched this round when no fetch ran',
|
|
312
|
+
);
|
|
313
|
+
assert.ok(
|
|
314
|
+
headNullIndex < branch.indexOf('continue'),
|
|
315
|
+
'expected head to be invalidated before the retry continues to the next round',
|
|
316
|
+
);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
test('the preflight consumes the head returned by resolveMergeConflicts without an immediate re-resolve', () => {
|
|
320
|
+
const consumedHeadIndex = convergeSource.indexOf('head = await resolveMergeConflicts(');
|
|
321
|
+
assert.notEqual(consumedHeadIndex, -1, 'expected the post-rebase head from resolveMergeConflicts to be captured');
|
|
322
|
+
const whileLoopIndex = convergeSource.indexOf('while (iterations < CONFIG.maxIterations)');
|
|
323
|
+
const betweenPreflightAndLoop = convergeSource.slice(consumedHeadIndex, whileLoopIndex);
|
|
324
|
+
assert.doesNotMatch(
|
|
325
|
+
betweenPreflightAndLoop,
|
|
326
|
+
/runGitTask\(/,
|
|
327
|
+
'expected the reuse pass to reuse the threaded head with no git-utility agent spawn',
|
|
328
|
+
);
|
|
255
329
|
});
|
|
256
330
|
|
|
257
331
|
test('fix edit prompt resolves threads by PRRT thread node id looked up from the comment databaseId', () => {
|
|
@@ -553,7 +627,7 @@ test('the reuse pass applies its findings through applyFixes, not the standards-
|
|
|
553
627
|
const reuseBlock = convergeSource.slice(reuseCallIndex, loopIndex);
|
|
554
628
|
assert.match(
|
|
555
629
|
reuseBlock,
|
|
556
|
-
/applyFixes\(
|
|
630
|
+
/applyFixes\(head, reuseFindings, 'reuse-pass'\)/,
|
|
557
631
|
'expected the reuse pass to apply its findings via applyFixes',
|
|
558
632
|
);
|
|
559
633
|
assert.doesNotMatch(
|
|
@@ -73,7 +73,7 @@ test('Copilot findings route to a fix when Copilot is reachable and not down', (
|
|
|
73
73
|
|
|
74
74
|
test('COPILOT_SCHEMA carries a required down field', () => {
|
|
75
75
|
const schemaStart = convergeSource.indexOf('const COPILOT_SCHEMA =');
|
|
76
|
-
const schemaEnd = convergeSource.indexOf('const
|
|
76
|
+
const schemaEnd = convergeSource.indexOf('const REVIEWER_AVAILABILITY_SCHEMA =');
|
|
77
77
|
assert.notEqual(schemaStart, -1, 'expected COPILOT_SCHEMA to exist');
|
|
78
78
|
const schemaSource = convergeSource.slice(schemaStart, schemaEnd);
|
|
79
79
|
assert.match(schemaSource, /down:\s*\{\s*type:\s*'boolean'/);
|
|
@@ -39,7 +39,7 @@ test('the git agent handles merge-conflict checks with a Monitor-based poll', ()
|
|
|
39
39
|
/do not edit, commit, push, or rebase|read only/i,
|
|
40
40
|
'expected the git agent merge check to be read-only',
|
|
41
41
|
);
|
|
42
|
-
assert.match(gitBody, /
|
|
42
|
+
assert.match(gitBody, /PREFLIGHT_GIT_SCHEMA/, 'expected the git agent to return PREFLIGHT_GIT_SCHEMA');
|
|
43
43
|
assert.match(gitBody, /Monitor tool/, 'expected a Monitor-based poll delay, not a foreground sleep');
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -53,31 +53,38 @@ test('runCodeEditorTask conflict-edit path rebases onto origin/main and makes no
|
|
|
53
53
|
);
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
-
test('resolveMergeConflicts runs
|
|
56
|
+
test('resolveMergeConflicts runs edit -> verify -> commit and gates the push on the verdict', () => {
|
|
57
57
|
const body = functionBody('resolveMergeConflicts');
|
|
58
|
-
const checkIndex = body.indexOf("runGitTask('check-merge-conflicts'");
|
|
59
58
|
const editIndex = body.indexOf("runCodeEditorTask('conflict-edit'");
|
|
60
59
|
const verifyIndex = body.indexOf('runVerifierTask(');
|
|
61
60
|
const commitIndex = body.indexOf('commitWithRecovery(');
|
|
62
|
-
assert.notEqual(checkIndex, -1, 'expected the conflict check to run');
|
|
63
61
|
assert.notEqual(editIndex, -1, 'expected the edit step to run');
|
|
64
62
|
assert.notEqual(verifyIndex, -1, 'expected the verify step to run');
|
|
65
63
|
assert.notEqual(commitIndex, -1, 'expected the commit step to run');
|
|
66
64
|
assert.ok(
|
|
67
|
-
|
|
68
|
-
'expected the order
|
|
65
|
+
editIndex < verifyIndex && verifyIndex < commitIndex,
|
|
66
|
+
'expected the order edit -> verify -> commit',
|
|
69
67
|
);
|
|
70
68
|
assert.match(body, /verdictPassed\(/, 'expected the verifier verdict to gate the force-push');
|
|
69
|
+
assert.doesNotMatch(
|
|
70
|
+
body,
|
|
71
|
+
/runGitTask\(/,
|
|
72
|
+
'expected the conflict decision to come from the merged preflight-git probe, with no mergeability agent spawned here',
|
|
73
|
+
);
|
|
71
74
|
});
|
|
72
75
|
|
|
73
|
-
test('resolveMergeConflicts rebases only when the
|
|
76
|
+
test('resolveMergeConflicts rebases only when the caller-supplied preflight decision reports a conflict', () => {
|
|
74
77
|
const body = functionBody('resolveMergeConflicts');
|
|
75
|
-
assert.match(body, /isMergeConflicting\(/, 'expected the orchestrator to branch on the conflict decision');
|
|
76
78
|
assert.match(
|
|
77
79
|
body,
|
|
78
|
-
/if \(!
|
|
80
|
+
/if \(!isConflicting\) return head/,
|
|
79
81
|
'expected a clean PR to return the unchanged HEAD without rebasing',
|
|
80
82
|
);
|
|
83
|
+
assert.match(
|
|
84
|
+
convergeSource,
|
|
85
|
+
/resolveMergeConflicts\(preflight\.sha, isMergeConflicting\(preflight\)\)/,
|
|
86
|
+
'expected the call site to derive the conflict decision from the merged preflight-git result',
|
|
87
|
+
);
|
|
81
88
|
});
|
|
82
89
|
|
|
83
90
|
test('the merge-conflict pre-flight runs once before the round loop, ahead of the parallel bug-check lenses', () => {
|