Skip to content

Replace sidebar worker absence with a nominal unscheduled value - #1356

Merged
trissim merged 1 commit into
mainfrom
fix/sidebar-worker-presence
Oct 30, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/sidebar-worker-presence

Conversation

@trissim

@trissim trissim commented Oct 30, 2026 •

Copy link
Copy Markdown

Summary

1 coherent correction across 3 files (+50/-22): the sidebar's Worker[None] | None slot becomes Worker[None] | NoWorker; 3 worker-slot absence decisions become 0. The short-list assertion now checks that no worker replaced the original unscheduled value. A running-worker identity assertion also rejects duplicate admission.

Requested by claude-code, bus 44043, as the remaining P972 sidebar annotation correction after #1344 merged. This is not a claim that P972's application qualification is complete.

Worker ownership: before / after

Before, SidebarGroup._row_mounting used None for unscheduled work. Production reconcile_rows and two tests each interpreted that encoding before asking the worker about its state. IDEN-3 / BOUND-1: the unscheduled answer was supplied separately by consumers (paper1 §1, Theorems 4.6–4.7).

After:

  • NoWorker declares the unscheduled answers: finished, not running, no error. It creates no coroutine, native worker, task, manager entry or state mirror.
  • The slot contains this nominal value or the original native Worker[None] returned by DOMNode.run_worker.
  • Admission asks is_finished; the lifetime test asks is_running; the frame test asks is_finished. No None, isinstance, tag switch, wrapper or Protocol reconstructs which case is present.
  • Textual still owns real admission, pending/running/terminal states, cancellation and completion. Its worker state transitions, cancellation, error handling and manager removal are unchanged.

No existing abstraction, key or required worker distinction is erased. The original None state and its replacement give the same admission answer; pending/running workers still refuse another start and terminal native workers still permit one.

Broken test consumer removed in the same correction

test_sidebar_rows_in_steps.py still called a deleted four-positional reconcile_rows(keys, members, create, update) API, mounted its group outside the required TargetTree, and kept its own member map. It now implements the existing member_keys, new_row, show_member and sync_members(changed=...) hooks, inherits native row-position painting through AlternatingTone, and mounts under a real TargetTree with the real reconciliation owner.

The frame-growth, order, paint-once, partial-first-step and no-frame-hold assertions remain. The short case preserves a stronger observation than merely checking a finished worker: the unscheduled value's identity must never be replaced. The real channel lifetime case retains its hide/finish/error/reveal assertions and adds the same-worker assertion across a second pending reconciliation.

test calls an API with four arguments
API accepts one keyword
the worker was not the only thing absent

Source evidence

  • Started from fresh Toad main 20d7971c0294451c4ad63dbd4c3411b3e9c43bb3, pushed the fresh branch, and verified ls-remote = HEAD before editing.
  • Fetched before commit and fast-forwarded to main c59b3766249f928c710a981e1fc40d491141e5b1, retaining main's P954: reland paired narrow relationship readers and complete controls #1349 revert. No edits to the paired producer or reverted caller code.
  • git grep -n -E '_row_mounting|sidebar-rows|NoWorker|AbsentWorker|IdleWorker' -- src tests tools identified the complete named slot family: sidebar_tree.py, test_channel_member_mount_lifetime.py, test_sidebar_rows_in_steps.py. After migration, all named slot absence checks and assertIsNone are gone.
  • NRA ModuleSyntaxIndex census: original 638 Python files, 2006 class declarations, zero parse omissions, plus original slot reads/writes/decisions/imports. The corpus covers all Toad src/tests/tools and Textual worker.py, worker_manager.py and dom.py. Post-change/current-main census and exact command/results are retained under /home/ts/.cache/agent-scratch/awareness-schema/p972-worker-source-{before,current}.json and corresponding logs.
  • Source trace includes ChannelGroup, RelationshipRows, WelcomeSection and the test group as all declared SidebarGroup consumers. The shared base handles their admission. Other independent optional-worker lifetimes were observed but are outside this assigned slot correction.
  • git diff --check passed. No local NRA gate, collection, import probe, pytest, app/provider run or installation was performed.
  • One initial source collector was interrupted with INT at 119 seconds because it repeatedly extracted every node's source. Its failure is retained in p972-worker-source-before.log; the corrected bounded collector filters the NRA index before extracting the relevant sites. No production operation or original input was replayed.

Current-main correction

Current head 85d3543b75ded5343b2db68797c1f564f33509e7 rebases the single correction onto main a78684c4b1b440186c46f3701c75cf4506a39601. Remote SHA equals HEAD. Auto-merge was disabled before rewriting my owned branch, and the push used an exact old-head lease (3845bd8a3d803c7b7d8057b181ceb98d3f6ff864). No other branch was rewritten.

My earlier head lacked #1321 (643d2a5e6) and hosted run 41016985257 failed during collection on the old BoardRow import: 504 tests collected, 72 errors, exit 2, zero executed tests. Main having the fix was not enough: I had left the PR on its stale caller. The rebased head now contains #1321 and #1358's Core relock. Whole src/tests/tools grep finds no BoardRow caller. A direct old-head/new-head comparison of all three owned files exits 0: the reviewed sidebar and test blobs are byte-identical, and the main-relative diff remains +50/-22. Earlier checks and review belong to the earlier head, not this one; no new executed test or application proof is claimed.

Integration still required

The integration owner must run one combined necessary selection under its test lease:

  • tests/textual/test_channel_member_mount_lifetime.py
  • tests/textual/test_sidebar_rows_in_steps.py
  • P972's four already-migrated Messaging paths if not yet qualified on the paired stack.

Then exercise the installed sidebar: short lists without scheduled work; long-list stepped growth; repeated reconciliation without a duplicate worker; hide while waiting for a frame; terminal completion; reveal/resume; view/tab return. Existing configured application acceptance remains integration-owned. Source/AST evidence is not execution proof (paper1 Corollary 4.10; paper4 §1).

Assumed: the assigned unscheduled case should permit admission while reporting not-running; native Worker.is_finished continues to own pending/running/terminal distinctions. No assumption of passing tests, merged delivery, installed behavior or improved latency.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 06:55

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim enabled auto-merge October 30, 2026 07:31
@trissim
trissim disabled auto-merge October 30, 2026 09:06
@trissim
trissim force-pushed the fix/sidebar-worker-presence branch from 3845bd8 to 85d3543 Compare October 30, 2026 09:06
@trissim
trissim enabled auto-merge October 30, 2026 09:07
@trissim
trissim merged commit 3860cf8 into main Oct 30, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants