Repository navigation
fix(shell): the relay seam's test keeps to approvals of its own - #297
Merged
Merged
Conversation
The supervisor saw the kernel end (its stdout closing, or its exit status) and read the stderr tail at once, but stderr is copied into the tail by a task of its own. The line the kernel wrote just before it exited could still be in the pipe, so the reason lost it: CI's `a_kernel_that_dies_closes_its_connections_with_its_last_words` failed with "the kernel closed its output: fake kernel up", without the "asked to exit" the fake kernel wrote last. The tail is now read after the kernel is stopped and the stderr task has reached the end of the pipe (bounded at 2 s, for a process the kernel started that still holds the pipe). Failed reasons get the same complete tail. The test asks for the last words themselves, not just "exit". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… probes The glance tile tests register probe system apps (os.glancetile, os.glanceinput, os.glancequiet, os.glancesweep) in App Hub's system-app registry. That registry is process-wide, has no removal, and is the one `system_card_apps` lists, so a catalog test running after a glance test in the same process saw the probes as launcher rows: `bundled_apps_open_without_catalog_files_or_child_processes` failed its catalog comparison 7 of 10 times beside `glance_card::` on main, and `the_system_apps_ship_as_card_apps` compares the same list. Tests now register their system apps through `apps::test_system_apps::register`, which notes the id before it registers it, and the tests of the build's own catalog leave noted ids out. Production code is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`approvals::tests::the_relay_gets_decisions_made_before_it_was_installed` began with `init_memory()`, which replaces the shell's process-wide approvals with empty ones. Every consent a test running beside it had given was gone. `app_chat::tests::the_panel_opens_a_sharing_context_and_sends_person_turns_there` allows its app, then reads `agents::line()`, which reports a peer slug only while the app is allowed. Beside `approvals::` it failed 50 of 50 runs with `peer_slug: null`. The same test also installed its recording relay into the shared approvals, where it would take other tests' decisions. The relay seam (`approval_requested`, `set_relay`, `bus_requested`) is now methods on `Approvals`. The free functions call them on the shell's approvals, as before. The test builds `Approvals::memory()` and never touches the shared one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote
force-pushed
the
fix/flaky-approvals-store
branch
from
October 2, 2026 20:57
4c03ca0 to
967418c
Compare
Contributor
Author
|
Merged in a merge train; local CI (Mac with rom toolchain + --linux-host) passed on the train head 72e5d55, which contains this PR.
The train was #291, #293, #297, #294, #298, #295, #296, #299, #300 and #292, on main f6678b5. After the last merge, main 301be0c has the tested head's tree. |
This was referenced Oct 2, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the flaky
app_chat::tests::the_panel_opens_a_sharing_context_and_sends_person_turns_there. Beside the approvals tests it fails every time:Cause
The cause is shared global state.
approvals::tests::the_relay_gets_decisions_made_before_it_was_installedbegan withapprovals::init_memory(), which replaces the shell's process-wide approvals with empty ones. The app_chat test allows its app, then readsagents::line(), which gives apeer_slugonly while the app is allowed. When the reset landed between those two steps, the consent was gone. The same approvals test also installed itsRecordingRelayinto the shared approvals, where it would take other tests' decisions (the real-kernel tests route theirs through the shared relay).Fix
approval_requested,set_relay,bus_requested) is now methods onApprovals.Approvals::memory()and never touches the shared approvals. No other approvals test did.Evidence
All runs were on the Linux build host, using the shell test binary built at main (cc59e67) and at this branch.
app_chat::tests::the_panel_opens_a_sharing_context_and_sends_person_turns_there approvals::, 50×tests.rs:416withleft: Nullapp_chat:: approvals::, 50×octosense-shell --libsuite with the real kernel, 30×The other failures in the whole-suite runs are not this flake. They are the catalog-test flake that #293 fixes, the Linux-only
a_program_reached_through_a_link_outside_its_roots_starts(ETXTBSY), andreal_kernel_an_app_agents_turn_calls_news_list_through_the_shells_relay, which failed once on main and not on this branch.🤖 Generated with Claude Code