Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 3a3c37a48707a734aea64b53c753d2b258fe645c
parent 34f1af527cd9356195bbafea59789bc56506b6ee
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 11 Sep 2026 12:40:15 -0400

priority: ending a focus recompiles, because the stored tree is what is left

The e2e caught it: "a default document compiles nothing" is right for a corpus
whose roots the compiler has never written, and wrong for one whose roots it
HAS. Ending a focus leaves the document saying nothing while every stored root
still opens with `prio-focus` — and the runner, back on its bypass, dispatches
from exactly that tree and goes on holding the channels the focus was just
ended for.

So the condition is the tree, not only the document: recompile when the
document says something OR when the stored roots already carry `prio-*` ids.
There is no hand-made tree left to protect on a corpus the compiler has
already written, and there is one to protect on a corpus it has not.

`channel-priority.spec.ts:172` ("Focus site holds the rest, and End focus
releases them") is the case, and it was red.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Diffstat:
Meditor/app/channels/actions.ts | 27+++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/editor/app/channels/actions.ts b/editor/app/channels/actions.ts @@ -808,13 +808,28 @@ export async function saveChannelPriorityAction( ) : stored; const next = sanitizeChannelPriority(applyPriorityEdit(base, edit)); - // A DEFAULT DOCUMENT COMPILES NOTHING, which is the same rule - // `laneDispatchRoot` applies: with nothing to say, the stored trees stand - // exactly as they are. Compiling here anyway would replace a hand-made tree - // with an all-normal one at the moment the last priority was cleared — and - // the runner, back on its bypass, would then dispatch from that. + // WHEN A DEFAULT DOCUMENT STILL HAS TO COMPILE, and the two halves of the + // question are different corpora. + // + // The runner's bypass means a default document dispatches from the STORED + // tree, so what matters here is what that stored tree is: + // + // never compiled (hand-made, or the shipped default) -> LEAVE IT. This is + // the same rule `laneDispatchRoot` applies, and compiling over it would + // replace an operator's tree with an all-normal one at the moment the last + // priority was cleared. + // + // already compiled -> RECOMPILE, even for a default document. Ending a + // focus leaves the document saying nothing while every stored root still + // opens with `prio-focus` — and the runner, back on its bypass, would + // dispatch from exactly that tree and go on holding the channels the focus + // was just ended for. There is no hand-made tree left to protect on a + // corpus whose roots the compiler already wrote. const autoQueue = { ...settings.autoQueue }; - if (!isDefaultChannelPriority(next)) { + if ( + !isDefaultChannelPriority(next) || + hasCompiledLaneRoots(settings.autoQueue) + ) { const focusSlugs = resolveFocusSlugs(next, siteChannelIndex(paths), slugs); const roots = compileLanes(next, slugs, focusSlugs); for (const lane of LANES) {