Skip to content

Share the rule reader independently of board authority - #3838

Closed
trissim wants to merge 1 commit into
mainfrom
pi-commander-shared-reader
Closed

trissim wants to merge 1 commit into
mainfrom
pi-commander-shared-reader

Conversation

@trissim

@trissim trissim commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Summary

First source checkpoint: 34 files, +197/-378. Six role-selected reader classes → zero; one concrete shared reader with three material capabilities. Prime's two role fields → one reader declaration. Three RuleAudience declarations and22 audience frontmatter flags → zero. 12 changed Python files compile; actual four Prime source sets/MRO/import origin checked. No pytest/native/physical acceptance claimed yet.

This extracts the independent reader boundary from #3824 so #3820 preparation does not wait for board/consent/review-authority work. It does NOT include #3820's producing-question changes or #3829 retention. The full #3824/742577 and #3820/8607 histories remain preserved; #3824 should rebase on the accepted reader change rather than keep its copy. No auto-merge or installation requested by this checkpoint.

One source set; explicit material choices

Before: abstract DeckReader + FleetReader/CommanderReader and role-specific refresh/light subclasses. CommanderProject chose the reader; Prime repeated fleet/commander fields. Two sessions could receive different rules solely because a storage declaration/tag chose a role.

After: DeckReader owns the common papers, ordered rules, voice, failure catalog, shared skill, NRA index and indictment. RulesOnly removes papers; IndictmentFree removes the indictment; LightReader composes both via C3 MI. The Full/Paperless/Indictmentless/Light Prime classes each declare their reader once. PiRedeal and CLI prime consume it after the existing exact-birth lookup. No compatibility aliases or second role roster.

Observed source sets: full36, no-papers27, no-indictment35, light26. LightReader MRO: LightReader → RulesOnly → IndictmentFree → DeckReader → DealtSources → ABC → object.

RuleFile supplies rendering and the order footer

RuleAudience's grouped audience rendering and role headings are deleted. RuleFile.render_packaged() supplies native instructions; RuleFile.order_line() supplies the Todo order footer. All22 packaged frontmatter audience fields are deleted, while rule bodies are unchanged in this extraction. The decoder/type discriminator remains owned by RuleFile/FieldCodec.

CommanderProject.deal_rules and its unused TYPE_CHECKING imports are deleted. CommanderProject.by_role remains only for its existing project-membership fact, not source selection; no new authority or registration behavior is imported.

Preserve independent boundaries

  • HeldOrders API and board scope remain main's implementation. DeckStart retains the current registered-board reads; storage-lead display comes from the actual lead declaration. The shared board changes remain in Remove rank-based authority and share the rule reader #3824.
  • No holder/receiving consent, review permission, actor binding, subagent activity or fork-role change. In particular, hook_read_gate.py's SubagentActivity rank change is excluded. Existing fork-registration assertions remain on main's behavior.
  • Failed/partial reads still do not record successful receipts. Resume/context/audit behavior remains in the existing owners.
  • The private board fixture explicitly mutes heartbeat publication and uses retained observations instead of publishing full-board messages. Production defaults are untouched.
  • Full-board heartbeat remains Off for the working colleagues.

Source evidence and boundaries

Existing NRA SourceModule/ModuleSyntaxIndex/canonical class-family projection supplement the retained171-module map with whole tracked Core retrieval at71e/742577/8607, all #3820 changed Python files and paired Toad consumers. Before: baseline208modules/2284original classes/2255projections/125446sites; shared209/2277/2248/126410; producer208/2291/2262/126507. Zero parse omissions;29 original unprojected classes per variant remain OPEN. test_holder_consent.py is explicitly absent on baseline/producer, not a parse omission. Dynamic/foreign/rebinding/runtime/behavior remain OPEN. This is authored extraction, not an executable migration certificate or comparable debt total.

Whole Core src/tests/tools plus paired Toad src/tests search finds no removed reader/audience names or Prime role fields. The Toad root was positively checked with CommsUpdateConsumer at acp/comms_updates.py:61. Changed files are only the declared reader/RuleFile/consumer/fixture closure; board and authority modules stay out except the precise Todo footer and deletion of the unused reader helper.

The first map driver timed out at180s/rc124 inside stdlib ast.get_source_segment's repeated source splitting. It imported no subject behavior and produced no completed JSON. Corrected driver reused ParsedModule.source_segments; the second three-revision map completed rc0. Both logs retained. Source map is evidence, not runtime acceptance.

Checks executed / still required

  • git diff --check HEAD: rc0.
  • Installed71e Python with explicit owned-source root: compile all12 changed Python modules, import exact owned DeckReader/PiRedeal/RuleFile, decode22 packaged rules, resolve all four Prime choices and LightReader MRO, verify every reminder slice fits its declaration-derived width2781: rc0.
  • No pytest, full suite/local NRA gate, native/provider/frontend process or installation launched for this source checkpoint. Necessary combined reader controls, post-extraction source reproof, exact-head independent review, minimal composition with Integrate authored Pi question and five-rule batch patch #3820 and supported prefix/native acceptance remain OPEN. No inherited approval from742577.
  • Existing test lease is a collision control any colleague can use, not a queue behind pi-commander. Original failed/UNKNOWN roots and protected clients remain untouched.

Assumed

  • Tristan's explicit equal-colleague direction requires the same source set; explicit material omissions remain supported.
  • Reading the same rules does not itself authorize another thread's goal/holder changes. Those distinct authority facts stay in Remove rank-based authority and share the rule reader #3824.
  • No source-only or import result establishes the configured-native or physical user journey.

Copilot AI balanced review requested due to automatic review settings November 1, 2026 17:09

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. Try requesting a review at a lower effort level.

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.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

debt-src at 045fc2e, every finding:

+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-yk537ulf --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/agent-comms
= 10.281s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-yk537ulf --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/agent-comms (10.281s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-64c7ojym --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/formbridge
= 0.707s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-64c7ojym --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/formbridge (0.707s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-2t8ll23a --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/metaclass-registry
= 0.865s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-2t8ll23a --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/metaclass-registry (0.865s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-utpx9i7k --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/textual
= 1.370s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-utpx9i7k --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/textual (1.370s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-6tw4_0_h --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/toad
= 0.862s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-6tw4_0_h --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/toad (0.862s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-hc9fco2_ --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/ui-theme
= 0.711s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-hc9fco2_ --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/base/openhcsdev/ui-theme (0.711s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-ao2wl_oo --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/agent-comms
= 9.446s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-ao2wl_oo --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/agent-comms (9.446s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-dndij4m1 --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/formbridge
= 0.669s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-dndij4m1 --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/formbridge (0.669s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-_x923b3u --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/metaclass-registry
= 0.511s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-_x923b3u --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/metaclass-registry (0.511s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-azn8at5w --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/textual
= 0.906s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-azn8at5w --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/textual (0.906s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-a5hbgf1n --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/toad
= 0.953s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-a5hbgf1n --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/toad (0.953s elapsed)
+ CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-1p3fuu4s --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/ui-theme
= 0.463s CommandPhase: /home/runner/work/_temp/checker-venv/bin/uv build --wheel --out-dir /home/runner/work/_temp/paired-sources/metadata/metadata-1p3fuu4s --python /home/runner/work/_temp/checker-venv/bin/python /home/runner/work/_temp/paired-sources/head/openhcsdev/ui-theme (0.463s elapsed)
grew BannedVocabulary:src/agent_comms_hooks/skill.py +1
::warning file=src/agent_comms_hooks/skill.py::LintFindings +2 (warns, never blocks)
found BannedVocabulary:src/agent_comms_hooks/skill.py at src/agent_comms_hooks/skill.py:285
found LintFindings:src/agent_comms_hooks/skill.py at src/agent_comms_hooks/skill.py:51 (N805 First argument of a method should be named `self`) src/agent_comms_hooks/skill.py:308 (E501 Line too long (182 > 100)) src/agent_comms_hooks/skill.py:383 (E501 Line too long (106 > 100))
introduced BannedVocabulary:src/agent_comms_hooks/skill.py at lines [285]

@trissim

trissim commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Absorbed by merged #3820 (71773f6). All34 changed paths accounted for:23 identical at integration; remaining11 preserve shared-reader ownership and include exact-question/audit settlement, later rule corrections and current transport tests. Superseded verdict recorded on17c5c27e. Original branch retained; #3824 authority work is separate. Installed restarted-session/compaction evidence is retained by Salvage, not inferred from this source comparison.

@trissim trissim closed this Nov 2, 2026
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