Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skills/ce-code-review/references/cross-model-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Read this only from the branch that sends you here: Stage 3d's no-job-id start f
- Anything else: name the observed failure; do not run the did-not-run fallback.
- **Did-not-run fallback** (first no-review outcome, including the first one): the started job did not cover the adversarial lens. Do not retry that same route. Then:
1. If this is the first replacement attempt, the failed recipient was **not** an explicit user-stated preference (Step 1 item 1), and another attested-different installed+allowlisted target remains: announce that new recipient and start a new job with a new `CROSS_MODEL_FIXED_ROUTE`. Wait for it with the remaining shared deadline and fold its artifact the same way as the first job. That job now covers the lens. Never switch recipients inside the worker. If this replacement also ends in a no-review outcome, do not start a third peer; take step 2.
2. Otherwise (explicit recipient, or no other eligible peer): dispatch in-process `adversarial-reviewer` now. Coverage records the peer as not-run for quota/auth and that the lens used the local fallback.
2. Otherwise (explicit recipient, or no other eligible peer): dispatch in-process `adversarial-reviewer` now. Coverage records the peer as not-run for quota/auth and names the cover in exactly this form: `adversarial lens: in-process fallback (cross-model peer not run: <reason>)`, matching `peer.outcome: in-process-fallback`. Never write `harness-native fallback` here: that phrase is `ce-work`'s ship-gate signal for a review that ran without `ce-code-review` at all, and reusing it makes a complete review read as a skipped one.
A config or default selection is not an explicit user-stated preference. One replacement only; never silently continue to another recipient.

## Trust boundary (maintainers)
Expand Down
43 changes: 43 additions & 0 deletions tests/skill-conventions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1467,3 +1467,46 @@ describe("python interpreter resolution (no bare python3 invocations)", () => {
).toEqual([])
})
})

describe("review coverage fallback wording (issue #1732)", () => {
const RECOVERY = path.join(
REPO_ROOT,
"skills/ce-code-review/references/cross-model-recovery.md",
)
const PINNED_WORDING = "adversarial lens: in-process fallback"

test("did-not-run fallback branch pins the exact in-process Coverage wording", () => {
const content = readFileSync(RECOVERY, "utf8")
const fullForm =
/adversarial lens: in-process fallback \(cross-model peer not run: [^)]+\)/.test(
content,
) && content.includes("peer.outcome: in-process-fallback")
expect(
fullForm,
`cross-model-recovery.md must pin the exact Coverage wording \`${PINNED_WORDING} (cross-model peer not run: <reason>)\` so a complete review is never reported with ce-work's ship-gate skip phrase (issue #1732).`,
).toBe(true)
})

test("ce-code-review Coverage guidance never uses the ship-gate skip phrase", () => {
const skill = skillDirs.find((s) => s.relPath === "skills/ce-code-review")
if (!skill) throw new Error("skills/ce-code-review not found")
const offenders: string[] = []
for (const filePath of listMarkdownFiles(skill.absPath)) {
const fileRel = path.relative(REPO_ROOT, filePath)
const lines = readFileSync(filePath, "utf8").split("\n")
for (const [index, line] of lines.entries()) {
// The one legitimate occurrence names the phrase to forbid it
// (cross-model-recovery.md's "Never write `harness-native fallback`"):
// strip exactly that clause so the rest of the line is still checked.
const checked = line.replace(/never write `harness-native fallback`/i, "")
if (/harness-native fallback/i.test(checked)) {
offenders.push(`${fileRel}:${index + 1}`)
}
}
}
expect(
offenders,
"`harness-native fallback` is ce-work's ship-gate signal for a review that ran without ce-code-review; ce-code-review Coverage guidance must not reuse it for the in-process fallback (issue #1732).",
).toEqual([])
})
})
Loading