fix: fourth review round (mount-failure truth, toggle baking, root ambiguity)

cursor[bot]:
- enqueueEvent dedupes variant_mount_failed per variant, so a second
  broken variant is no longer swallowed while the first is queued.
- Every component (re)injection resets the mount-failure dedupe, so a
  republish that is still broken at the same URL reports again instead
  of silently convincing the agent the repair landed.
- Toggle baking now mirrors preview truth exactly: the runtime sets
  data-p-<id>="on" or removes the attribute, so presence and "on" forms
  survive only while on, and any other valued branch (never matched at
  preview) is dropped in either state.

greptile-apps[bot] (both P1 repros):
- When several apps qualify at the same resolution tier (two live
  servers, or two stopped apps with interrupted sessions), the choice
  stays deterministic but is now loud: a stderr warning names the chosen
  app, the alternatives, and how to target a specific app. Silent
  wrong-app routing was the failure in both repro harnesses.

This work was produced with AI assistance (Claude Code).

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-07-27 16:22:09 -07:00
co-authored by Claude Code
parent 40b2a80653
commit 39df25ee5a
5 changed files with 51 additions and 7 deletions
+12
View File
@@ -197,3 +197,15 @@ describe('review regressions: parser boundaries', () => {
assert.deepEqual([...selectors].sort(), ['.a', '.b', '.c']);
});
});
describe('review regressions: toggle branch truth', () => {
it('drops valued toggle branches that never matched at preview, keeps on-forms only while on', () => {
assert.equal(stripParamSelector('[data-p-flag="false"] .a', 'flag', 'toggle', true), null);
assert.equal(stripParamSelector('[data-p-flag="false"] .a', 'flag', 'toggle', false), null);
assert.equal(stripParamSelector('[data-p-flag="0"] .a', 'flag', 'toggle', false), null);
assert.equal(stripParamSelector('[data-p-flag="on"] .a', 'flag', 'toggle', true), '.a');
assert.equal(stripParamSelector('[data-p-flag="on"] .a', 'flag', 'toggle', false), null);
assert.equal(stripParamSelector('[data-p-flag] .a', 'flag', 'toggle', true), '.a');
assert.equal(stripParamSelector('[data-p-flag] .a', 'flag', 'toggle', false), null);
});
});