Repository navigation
0.7: forward-port 0.6.x persistence, sign-in and consent with in-place upgrade - #105
Merged
Merged
Conversation
Port the final 0.6.6 state engine, helper protocol, crypto backend and bounded FIFO. Add injectable production transport, canonical Session v2 profile validation, v1 public-only preservation, typed migration/readback and async admission APIs. Preserve target preferences and opaque nested fields, including endpoint refresh. Extend current package and linker-evidence gates with the independent helper. This is an unintegrated Stage A checkpoint. Current application Session/Consent callers remain active until Stage B wires owner permits, boot and resource adapters. The native activation/legacy identity bridges and ARM/device acceptance remain pending. Validation: make check; final default/hostsim/lab/shipping and lint checks; helper backend and package fixtures; focused RED/GREEN schema, PIN, migration, queue-refusal and opaque-field regressions. No television access or ARM packaging.
Preserve PlayerAdapter ownership while fencing native dispatch until Load returns, bounding both Load phases, and refusing affected sandbox starts. Keep one confirmed Repair attempt in the app-owned Player with an adapter receipt and owned confirmation input. Include source-correction regressions for constructor timeouts and stale Load failures, plus host evidence and integration limits.
Publish the dev jail refusal on the owned playback session before screen delivery, preserving the hardware verdict and normal retirement behavior. State visual fit as an outstanding simulator obligation. Cover the scenario helper and real screen Tick with a RED-to-GREEN regression.
Return authenticated helper Sessions in CanonicalRead::Opened instead of round-tripping them through flattened legacy JSON. Preserve opaque protected v1 extensions even when their names collide with recognized target Session fields. Compare both typed schema halves during migration readback without flattening. Remove the production whole-snapshot replace API. Lifecycle fixtures now use the same guarded permit-and-merge admission implementation as production callers. Validation: observed duplicate profiles/account_token bootstrap failures and snapshot guard bypass before the fixes; collision and admission regressions now pass. Final host library suite, hostsim Session suite, named Clippy gates, shipping feature check, and diff checks pass. No TV or cross-build work.
The commit path answered one bool, `accepted`, which meant only "this
authority was current". A registry-only commit that asked storage for
nothing and a credential write that merely reached the queue both read as
durable, and the caller had no way to tell a stale completion from the
current one.
Introduce a typed admission (StaleAuthority / RegistryOnly / Admitted
{revision, purpose} / Rejected), a persistence purpose so a background
refresh can never be offered as proof of a saved login, and a typed
completion fenced by request/epoch/arrival/revision. The owner records
only the logical pending/durable bit; channels and receipts stay in the
adapter. Purpose is decided by the operation, not by whether a patch
happens to be present. Ordinary retry re-writes at most the dirty
Routine/PublicOnly authority and cannot acquire FreshReauthentication.
The adapter's live disk write keeps its existing synchronous shape;
handing it to the typed asynchronous coordinator is the Stage B bridge
and boot wiring.
The owner learned `Admitted { revision, purpose }` but had no way to
learn the verdict that followed: nothing ever constructed a
persistence completion, so a background refresh and a completed
sign-in were still indistinguishable to it, and a stale verdict could
not be fenced because none could arrive.
The live writer is synchronous and reported nothing, so the adapter
now calls `update_with_outcome` and reports what the write actually
did: a refusal to downgrade an existing secure envelope and a failed
write are both `WriteFailed`, not durability. The adapter keeps that
real verdict with the correlation the permit was issued for, and the
bridge drains it exactly once and delivers it as `SessionEvent::
Persistence` on the ordinary effect path.
The owner settles a verdict only through `apply_persistence_completion`,
which fences it by request, epoch, arrival and revision together, and
additionally by the admitted purpose: a verdict resolved for a purpose
other than the one storage was asked to write for is not this
operation's verdict. Only a durable outcome for a saved-login-proving
purpose sets `proves_saved_login`; a Background refresh becomes durable
without ever standing as evidence a login was saved.
The purpose now comes from the reply rather than the plan, because the
plan records intent while the admission records what was enqueued; the
first version fenced on the plan's purpose and the new test caught it.
Validation: RED observed first (the base owner cannot construct the
event at all: no variant `Persistence` on `SessionEvent`), and the
end-to-end test also caught the fixture arm not being a durability
authority, so it was rewritten against the real writer. Full library
suite 3408 passed, 0 failed, 1 ignored; shipping `--no-default-features`
check and `git diff --check` pass. No ARM, IPK, simulator or device work.
Wrapping `read_legacy_locked` in a `#[cfg]` that excluded it on ARM left `keymanager::open` — and `keymanager::decode` under it — with no caller, which `-D warnings` rejects, so the ARM cross-build stopped compiling. It also contradicted the plan: on ARM a pre-DB8 install has no canonical record yet, so the legacy `auth.json` is a migration INPUT that the canonical bootstrap consumes, not something to make unreadable. The reader is now available on every target. `read_live_locked` still prefers the canonical record and falls through to the legacy reader only when the canonical store answers `Missing`, so behavioural intent is unchanged; only the ARM compile is repaired. Validation: `make` (full ARM cross-build) now completes and produces the 32-bit ARM app and helper ELFs; the same build failed at `error: function `open` is never used` before this fix. Host library suite 3409 passed, 0 failed, 1 ignored; shipping check and `git diff --check` pass. No ARM run on a device, no IPK, no TV work.
Sonnet stays the coordinator/default fixer; Opus stays the mandatory post-implementation review gate and now also runs an optional read-only pre-implementation review of the frozen contract for packages flagged high-risk (persistence, concurrency/ownership, auth/session, migration, native lifecycle). Fable is added as a bounded escalation model only: one shot, only for findings that survived >=2 materially different Sonnet fix attempts, never a default fixer. maxWorkers is capped at 2 concurrent implementation workers for this task. A failed, unavailable or incomplete premium review is now its own terminal REVIEW_PENDING verdict rather than being folded into BLOCKED, so it can never read as PASS. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Records what a prior Codex worker session established before a provider quota disconnect cut it off mid-regression-test, confirms the two known gaps from the ab2a929 row still exist verbatim at fbf1bcd, and points at AUTH-08/AUTH-09 (logout must clear DB8 authority; a canonical Cleared record must not read as Blocked/locked) as the next package. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
…leared with Locked/Blocked
AUTH-08: session::clear() swept only legacy on-disk file candidates and never
told the canonical persistence authority (persistence::commit_cleared()) that
the tenure was cleared. On a build where persistence::load()/write_session()
back a real canonical store, the account token and roster survived sign-out
in that authority even though every legacy file was gone. clear() now also
commits an explicit Cleared record under the same _io lock, logging (never
panicking or failing the legacy sweep on) anything short of a verified
Durable commit.
AUTH-09: read_locked() mapped persistence::CanonicalRead::Cleared onto
ReadState::Blocked, the same state used for a genuinely locked/unreadable
envelope. Downstream, prepare_load() then treated a cleanly signed-out
device as `locked = true`, producing locked/blocked boot framing instead of
a plain signed-out Home. Added a dedicated ReadState::Cleared variant (a
real match arm rather than a flag on Blocked, so every exhaustive match is
forced to decide the two properties separately) that:
- reads like Missing for `persisted`/session construction/boot framing
(not locked, mints and persists a fresh client id normally), while
- still unconditionally shadows a reappearing legacy file, exactly as
Locked/Blocked already do, preserving read_live_locked()'s
Missing-only legacy fallthrough.
Two new regression tests exercise the real persistence::load()/
write_session()/commit_cleared() path (via
crate::paths::redirect_persistent_state_root_for_test, not the TEST_FILE
legacy-file bypass, which would skip the canonical authority entirely):
clear_commits_a_canonical_cleared_record_so_the_account_token_does_not_survive_signout
and
a_cleared_canonical_tenure_boots_clean_and_still_shadows_a_reappearing_legacy_file.
Both were observed red against the pre-fix code for the stated semantic
reason and green after.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
…Cleared Weaves in the AUTH-08/AUTH-09 forward-port package: logout now calls persistence::commit_cleared() so sign-out actually clears the canonical authority, and a new ReadState::Cleared variant stops a cleared tenure from being conflated with Locked/Blocked's locked UI framing while still unconditionally shadowing a reappearing legacy file. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Appends one row to the v0.7.0 forward-port verification ledger for the auth-clear-fix package (0dc0e85, merged at 637cf2b): session::clear() now commits a canonical Cleared record via persistence::commit_cleared(), and CanonicalRead::Cleared maps to a new ReadState::Cleared variant that presents like Missing (clean signed-out boot) instead of Locked/Blocked, while still unconditionally shadowing a reappearing legacy file. Names the exact regression tests, their RED/GREEN evidence, and the full suite/no-default-features/ARM-compile results as reported by the fix package. Explicitly calls out what remains NOT PROVEN (make check's own end-to-end exit code, DB8/Keymanager, ARM device, IPK, simulator/TV), and states that no artifact for this HIGH RISK package's mandatory post-implementation independent review was found in the worktree history, so the row's verdict is REVIEW_PENDING rather than a closed pass. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
… report clear durability Five review findings against the AUTH-08/AUTH-09 package (0dc0e85/637cf2b0): - clear-bypasses-test-file-guard [blocker]: clear() now carries the same #[cfg(test)] TEST_FILE short-circuit its siblings (save_locked_with_authority, read_live_locked) already have, so a legacy-fixture test (TempSession) never reaches the process-wide canonical authority. Without it, `make check`'s hostsim pass could durably sign out whatever canonical store the process's default instance root resolves to (e.g. a running `make sim` simulator sharing /tmp/state). - signout-leaves-token-in-unswept-candidates [high]: after a durable canonical commit, clear() now also calls persistence::cleanup_after_confirmed_clear(), which retires the full recognized migration-candidate set (paths::session_migration_candidates(), plus the pre-DB8 canonical JSON wrapper on ARM) rather than only the legacy auth_paths() list clear()'s own sweep covers. - failed-canonical-clear-is-silent [high]: clear() returns a new ClearOutcome (Durable{legacy_swept} / NotDurable) instead of (), so a caller can tell a durable sign-out from one whose canonical commit did not land. app/adapters/session.rs::erase() now consumes it and logs a distinct, call-site-scoped line for a non-durable clear. Full plan-section-2 Resetting/ Retry UX (docs/v0.7.0-forward-port-plan.md line 85) still needs a reducer-visible state in auth::owner's session state machine, which is outside this package's file scope and is not attempted here. - designed-shared-fifo-clear-is-dead [medium]: decided explicitly, not left silently duplicated. session::clear() stays the synchronous implementation (matching save()'s own synchronous live-write precedent) rather than being wired to async_persistence::clear_after()'s FIFO-ordered coordinator, which needs main-loop polling integration Receipt::wait_blocking's own doc says production callers don't do. Documented the decision on clear_after() itself so the next package that adds the async handoff delegates to it instead of re-deriving its sequencing. - cleared-readstate-edits-untested [medium]: added two mutation-tested regressions — prepare_load_seeds_a_fresh_playback_quality_for_cleared_ exactly_as_for_missing and read_identity_gives_cleared_its_own_bucket_ distinct_from_every_other_state — pinning the two previously-unpinned edits from the AUTH-08/09 package (persisted's Cleared arm, read_identity's distinct Cleared bucket). - legacy-unlink-not-fsynced [low]: clear()'s own legacy-file removal loop now fsyncs the parent directory after each successful unlink, matching persistence::retire_exact_candidate's existing idiom, so an unlink is durable before a possible power loss right after sign-out. Five new regression tests in plex::session::tests, each observed RED via a simulated defect (the production code and its ClearOutcome return type did not exist before this package, so a byte-for-byte historical revert is not meaningful for most of these; each was instead reverted narrowly in place, run, and confirmed to fail for the stated reason, then restored) and GREEN after the real fix: - clear_under_a_redirected_legacy_fixture_never_touches_the_canonical_authority - clear_reports_an_incomplete_sweep_when_a_recognized_candidate_cannot_be_retired - clear_reports_a_non_durable_outcome_when_the_canonical_commit_is_refused - prepare_load_seeds_a_fresh_playback_quality_for_cleared_exactly_as_for_missing - read_identity_gives_cleared_its_own_bucket_distinct_from_every_other_state Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Ledger row for the clear()/ClearOutcome fix-wave commit, naming exactly what is and is not proven at this stage: host suites, shipping no-default-features check, make lint, and a clean isolated ARM `make` all green; make check's own end-to-end exit code, DB8/Keymanager, ARM device, IPK and TV/simulator reality remain NOT PROVEN. Verdict stays REVIEW_PENDING pending the gate's mandatory post-implementation Opus review, which runs after the wave lands, not inside this worker stage. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
…edger Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
A real TV leaked a private DNS hostname unredacted in
plxnative-events.log via stream.rs's DNS-failure line
("stream: GET /identity DNS FAILED host=<fqdn>"). scrub_authority
only rewrites a host embedded in a scheme://host URL; this line has
no scheme:// for that pass to anchor on, so the bare host=<fqdn>
token passed through every existing rewrite stage unmodified.
Reproduced first: a regression test pinning the exact reported shape
(stream: GET /identity DNS FAILED host=plex.main.example.net) was
run and observed red before any fix landed:
thread 'diag::scrub::tests::a_dns_failure_does_not_leak_the_bare_hostname' panicked at src/diag/scrub.rs:580:9:
the hostname survived: stream: GET /identity DNS FAILED host=plex.main.example.net
test result: FAILED. 0 passed; 1 failed
Fix: add scrub_host_kv, a new rewrite pass keyed on the literal
"host=" token (mirroring how scrub_params is keyed on literal
credential parameter names), wired into both scrub_local_with (disk
log) and scrub_with (lab-diagnostics remote exit) ahead of the
IPv4/IPv6 passes. It redacts the value after host= to <host> unless
it is empty, already a placeholder, or a 0x-prefixed hex dump (dev.rs's
softfloat probe reuses this exact key for a diagnostic hash, not a
hostname, and must survive untouched — pinned by a second test).
Grepped rust-modules/src for other bare host interpolations: net.rs's
refuse_name (the nowan dev-trigger refusal path) logged a bare
"{host}" with no key at all, so it was invisible to both the old
scrub_authority and the new scrub_host_kv. Changed it to spell
host={host} so it is covered by the same mechanism instead of adding
a bespoke redaction.
All 25 diag::scrub tests pass under both default features and
--features lab-diagnostics after the fix, with no other existing
test changed.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
There was a problem hiding this comment.
🔵 Needs a closer look
Critical lifecycle findings and unresolved persistence, deployment, and verification concerns remain.
Pull request overview
Forward-ports 0.6.x persistence, authentication, consent, native playback safeguards, sandbox repair, and storage-helper packaging into the 0.7 architecture.
Changes:
- Adds canonical DB8/host persistence and legacy migration fixtures.
- Preserves consent, session, profile, and opaque extension data.
- Adds native Load gating, timeout handling, sandbox repair, and related UI.
- Adds storage-helper packaging, CI validation, and verification documentation.
File summaries
| File | Change |
|---|---|
tests/test_native_load_gate.py |
Tests native dispatch gating during Load. |
tests/fixtures/persistence/v0.6.5/session.json |
v0.6.5 session migration fixture. |
tests/fixtures/persistence/v0.6.5/secure-envelope-v1.json |
v0.6.5 secure-envelope fixture. |
tests/fixtures/persistence/v0.6.5/consent-yes.json |
v0.6.5 accepted-consent fixture. |
tests/fixtures/persistence/v0.6.5/consent-no.json |
v0.6.5 declined-consent fixture. |
tests/fixtures/persistence/v0.6.4/session.json |
v0.6.4 session migration fixture. |
tests/fixtures/persistence/v0.6.4/secure-envelope-v1.json |
v0.6.4 secure-envelope fixture. |
tests/fixtures/persistence/v0.6.4/consent-yes.json |
v0.6.4 accepted-consent fixture. |
tests/fixtures/persistence/v0.6.4/consent-no.json |
v0.6.4 declined-consent fixture. |
tests/fixtures/persistence/v0.6.3/session.json |
v0.6.3 session migration fixture. |
tests/fixtures/persistence/v0.6.3/secure-envelope-v1.json |
v0.6.3 secure-envelope fixture. |
tests/fixtures/persistence/v0.6.3/consent-yes.json |
v0.6.3 accepted-consent fixture. |
tests/fixtures/persistence/v0.6.3/consent-no.json |
v0.6.3 declined-consent fixture. |
tests/fixtures/persistence/v0.6.2/session.json |
v0.6.2 session migration fixture. |
tests/fixtures/persistence/v0.6.2/secure-envelope-v1.json |
v0.6.2 secure-envelope fixture. |
tests/fixtures/persistence/v0.6.2/consent-yes.json |
v0.6.2 accepted-consent fixture. |
tests/fixtures/persistence/v0.6.2/consent-no.json |
v0.6.2 declined-consent fixture. |
tests/fixtures/persistence/v0.6.1/session.json |
v0.6.1 session migration fixture. |
tests/fixtures/persistence/v0.6.1/secure-envelope-v1.json |
v0.6.1 secure-envelope fixture. |
tests/fixtures/persistence/v0.6.1/consent-yes.json |
v0.6.1 accepted-consent fixture. |
tests/fixtures/persistence/v0.6.1/consent-no.json |
v0.6.1 declined-consent fixture. |
tests/fixtures/persistence/v0.6.0/session.json |
v0.6.0 session migration fixture. |
tests/fixtures/persistence/v0.6.0/secure-envelope-v1.json |
v0.6.0 secure-envelope fixture. |
tests/fixtures/persistence/v0.6.0/consent-yes.json |
v0.6.0 accepted-consent fixture. |
tests/fixtures/persistence/v0.6.0/consent-no.json |
v0.6.0 declined-consent fixture. |
tests/fixtures/persistence/README.md |
Persistence fixture documentation. |
tests/fixtures/persistence/manifest.json |
Persistence fixture manifest. |
tests/fixtures/persistence/generated/v0.6.6-json-store/session.json |
Generated canonical session record. |
tests/fixtures/persistence/generated/v0.6.6-json-store/consent.json |
Generated canonical consent record. |
tests/fixtures/persistence/generated/v0.6.6-db8-record.json |
Generated DB8 persistence record. |
tests/fixtures/persistence/generated/v0.6.5-errors-yes-declined-extension.consent.json |
Generated consent migration case. |
tests/fixtures/persistence/generated/v0.6.5-both-yes.consent.json |
Generated consent precedence case. |
tests/fixtures/persistence/generated/v0.6.0.session.json |
Generated legacy session record. |
tests/fixtures/persistence/generated/v0.6.0-no.consent.json |
Generated legacy declined-consent record. |
tests/fixtures/persistence/generated/v0.6.0-errors-yes.consent.json |
Generated legacy consent error case. |
tests/fixtures/persistence/generated/README.md |
Generated fixture documentation. |
tests/fixtures/persistence/generated/generators.patch |
Legacy fixture generator patch. |
src/starfish.c |
Native Load dispatch gate. |
rust-modules/src/webos/jail_repair.rs |
Confirmed sandbox repair workflow. |
rust-modules/src/webos.rs |
Jail probing and helper activation. |
rust-modules/src/ui/player_hud.rs |
Repair-aware player failure HUD. |
rust-modules/src/ui/decision_alert.rs |
Alert layout and neutral presentation. |
rust-modules/src/telemetry/sender.rs |
Consent-aware sender test updates. |
rust-modules/src/telemetry/mod.rs |
Telemetry persistence integration. |
rust-modules/src/telemetry/consent.rs |
Consent migration and scope preservation. |
rust-modules/src/storage_service/service.rs |
Storage helper service implementation. |
rust-modules/src/storage_service/runtime.rs |
Storage helper runtime handling. |
rust-modules/src/storage_service/bus.rs |
Storage helper bus transport. |
rust-modules/src/storage_service/auxv.rs |
Helper auxiliary-vector compatibility. |
rust-modules/src/screens/registry.rs |
Repair request routing. |
rust-modules/src/screens/profiles.rs |
Persistence-warning fixtures and profile flow. |
rust-modules/src/screens/player/input.rs |
Repair interaction and lifecycle state. |
rust-modules/src/screens/login.rs |
Persistence-warning login UI. |
rust-modules/src/screens/consent.rs |
Consent alert API integration. |
rust-modules/src/route/decision.rs |
Publishes repair and native state. |
rust-modules/src/plex/pins.rs |
Preserves opaque pin fields. |
rust-modules/src/player/threads.rs |
Publishes Load completion state. |
rust-modules/src/player/pump.rs |
Load timeout handling. |
rust-modules/src/player/mod.rs |
Jail and timeout failure states. |
rust-modules/src/player/machine.rs |
Process-lifetime repair authority. |
rust-modules/src/player/ffi.rs |
Native playback test seams. |
rust-modules/src/player/CLAUDE.md |
Native playback behavior documentation. |
rust-modules/src/player/adapter.rs |
Repair worker receipts. |
rust-modules/src/paths.rs |
Isolated test persistence roots. |
rust-modules/src/lib.rs |
Storage module registration. |
rust-modules/src/keymanager.rs |
Test keymanager reset support. |
rust-modules/src/dev/scenarios.rs |
Jail failure fixtures. |
rust-modules/src/browse/section_hubs.rs |
Persisted extension initialization. |
rust-modules/src/browse/mod.rs |
Browse-state extension initialization. |
rust-modules/src/bin/plxnative-storage.rs |
Storage helper executable. |
rust-modules/src/auth.rs |
Session and profile extension preservation. |
rust-modules/src/app/session_resource_tests.rs |
Session resource regression coverage. |
rust-modules/src/app/session_protocol_tests.rs |
Session protocol admission coverage. |
rust-modules/src/app/session_profile_regression_tests.rs |
Profile persistence regression coverage. |
rust-modules/src/app/session_dev_bootstrap_tests.rs |
Bootstrap completion coverage. |
rust-modules/src/app/run.rs |
Lifecycle polling and failure handling. |
rust-modules/src/app/playback.rs |
Repair request dispatch. |
rust-modules/src/app/content.rs |
Replay repair guard. |
rust-modules/src/app/consent_owner_tests.rs |
Logout persistence-clearing tests. |
rust-modules/src/app/bridge.rs |
Persistence completion delivery. |
rust-modules/src/app/adapters/consent.rs |
Consent commit and clear handling. |
rust-modules/Cargo.toml |
Storage helper binary target. |
pkg/appinfo.json |
Storage capability permissions. |
Makefile |
Helper build, packaging, and deployment rules. |
docs/v0.7-native-forward-port-evidence.md |
Native verification evidence. |
docs/parity-gaps.md |
Sign-out parity documentation. |
docs/native-video-sandbox.md |
Sandbox repair documentation. |
ci/test_storage_service_package.py |
Storage package validation. |
ci/test_link_evidence.py |
Link-evidence validation. |
ci/stage-link-evidence.py |
Link-evidence staging. |
ci/mkipk.py |
Storage service package staging. |
ci/check-package.py |
Packaged storage-service checks. |
.gitignore |
Ignores the helper build artifact. |
Review details
Suppressed comments (6)
Makefile:680
- The new helper is built by
all/ipk, butdeploystill depends only onpkg/plxnativeand copiesAPP_FILESinto the application directory; it never installs or updatesusr/palm/services/<app-id>.storage. Thusmake deployagainst an existing 0.6.x/debug install can run the new app with no matching helper (or a stale helper), making ARM canonical persistence unavailable. Add the service helper to the deploy path or make deploy explicitly require a package install before updating this code.
pkg/appinfo.json:20 - This changes the shipped package to declare
database.operationandsecuritykey.operation, but the public install and distribution guidance still says the app declares norequiredPermissions(docs/install-and-verify.md:28,docs/distribution.md:427-431). That leaves users and generated release audits with contradictory installation/security claims; update the documentation and its expected audit artifacts together with this package change.
rust-modules/src/app/adapters/consent.rs:95 - This persistence call runs synchronously from
ConsentMachine::recordduring bridge effect handling, but the ARM client can spend up to its 12-second startup deadline plus 8-second socket I/O timeouts while activating and contacting the helper. A helper restart or unavailable DB8 can therefore freeze the SDL/UI frame loop for many seconds at the moment the user answers consent. Move the helper transaction off the frame thread and deliver its typed completion asynchronously, or retain a nonblocking worker boundary for this adapter.
rust-modules/src/app/adapters/consent.rs:109 - On ARM,
persistence::forget()returnsDelegatedwithout removing any legacy consent candidates (telemetry/persistence.rs:870-885). The successfulSession::clear()cleanup only sweeps session migration candidates (plex/session/persistence.rs:1358-1372), sotelemetry.json/other legacy consent files remain on disk after sign-out until a later telemetry load happens to retire them. That violates the sign-out-clears-consent contract; include these candidates in the confirmed-clear cleanup or retire them as part of this path.
rust-modules/src/auth.rs:2937 - This rebuilds the cached credentials for an already-known profile with an empty extension map, so any opaque fields from a newer writer are lost on the next online profile switch. Preserve the existing
ProfileCreds.extensionsfor this UUID when constructingcache; otherwise the new forward-compatibility fields do not survive a normal read-modify-write flow.
rust-modules/src/player/mod.rs:813 LoadTimeoutis explicitly the no-response/hung path (the preceding docs distinguish it fromTvPipeline), but this branch reuses the refusal wording "the TV rejected the stream" for both the caption and panel. That tells users a firmware rejection occurred when the observed condition may be a hungLoador missingloadCompleted; use wording such as "the TV did not finish starting the stream" while keeping the distinct telemetry kind.
- Files reviewed: 68/115 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Merges #92 (trailer playback from detail), #89 (sequential media GETs reuse the HTTP/1.1 demux socket), #94 (Windows WSLg/Linux simulator support), the landing-page site/ tree and other unrelated origin/main work into this branch's own commit (13316a8, "fix: scrub bare host= key/value hostnames from logs"), resolving each conflicted file by preserving both sides' intent: - rust-modules/src/player/ffi.rs, mod.rs, pump.rs, threads.rs, webos.rs, src/starfish.c, rust-modules/src/app/playback.rs: kept both branches' independent additions (resolved in earlier sessions on this branch). - rust-modules/src/player/shared.rs: kept both sides' distinct `LoadCall` enum members; git's auto-merge had silently produced a duplicate enum definition with no conflict markers, caught only by compiling. - rust-modules/src/player/engine.rs: removed a duplicate `load_in_flight_tests` module that auto-merge combined from both sides without markers. - rust-modules/src/plex/session.rs: wired `trailer_autoplay` (our side) into `CanonicalSessionPreferences`, `split_public()` and `join_canonical()` (origin/main's refactor of the same struct), which the auto-merge had left half-connected. - rust-modules/src/screens/registry.rs: recombined the `SCREEN_SHAPES_PIN` changelog (already merged cleanly as text) and bumped the pin constant to the merged tree's real hash (0xb462_145d_9477_05de -> 0x0e66_311c_e4f1_0769), documenting the bump as the union of independent changes rather than one feature. Two more fixes were required for the merged tree to pass verification at all, both confirmed to be pre-existing defects already present on origin/main's own fetched tip (227d981) rather than anything this merge produced: - ci/check-deps.sh: restored the missing closing brace on `strip_strings_and_comments()` (a bash syntax error on origin/main's tip that broke `make check`). - ci/allow/sibling-migration.txt: replaced literal, unresolved stash-conflict markers baked into origin/main's own committed content with this branch's already-clean, closed-out version (count 0, matching a dangling repair commit b58db338 that fixed the same file identically but was never merged into origin/main). One further fallout fix, found only by the fourth verification command and unrelated to origin/main (the file does not exist there at all): rust-modules/src/webos/jail_repair.rs's `expect(dead_code)` condition on `Failure::Timeout` incorrectly required `devtriggers` to be off; hostsim's `call_hbc` stub never constructs that variant outside tests regardless of `devtriggers`, so `cargo check --features hostsim` (as opposed to `cargo test`, which compiles the test module that uses it) failed. Narrowed the condition to `hostsim` + `not test`. Verification, all green: - make check: full host suite + make lint + ci/check-deps.sh + all package/dependency gates pass (exit 0). - CARGO_INCREMENTAL=0 cargo +nightly check --no-default-features: passes. - cargo +nightly check --features hostsim: passes (after the jail_repair.rs fix above). - make (ARM cross-build, FLAVOR=debug): passes, produces pkg/plxnative and pkg/plxnative-storage. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
#92's trailer_autoplay contract is "absence is on", but two spots in the canonical/split-storage session read path (introduced by the v0.7 forward-port merge, 8f42586) contradicted it: - CanonicalSessionPreferences derived Default, giving trailer_autoplay: false via the plain bool default. join_canonical and public_session both fall back to .unwrap_or_default() when public.preferences isn't a JSON object (null, absent, or corrupt) -- and a struct field's `#[serde(default = "default_true", ...)]` only fires for a missing KEY inside an object being deserialized, never for this whole-value fallback. Fixed with a manual `impl Default for CanonicalSessionPreferences` that sets trailer_autoplay: true (the other fields keep the same "absence" values the derive already gave them). - public_session (the Locked/protected-bundle snapshot constructor) never read trailer_autoplay out of the parsed preferences at all, falling through `..Default::default()` on Session -- so a session opened while Keymanager is locked always reported the hero trailer off regardless of what was actually stored. Fixed by threading `trailer_autoplay: preferences.trailer_autoplay` into its Session literal, matching every other public preference field it already threads through. Test-first: added join_canonical_with_null_preferences_keeps_trailer_autoplay_on, public_session_with_null_preferences_keeps_trailer_autoplay_on (both observed red against the unfixed tree -- "assertion failed: session.trailer_autoplay()" -- before this fix), plus paired explicit-false cases for both functions (already green, kept as regression coverage). Grepped the rest of the canonical/public storage path for the same drop-a-field pattern; join_canonical already threaded every field explicitly and split_public/split_canonical (the write path) were already correct, so public_session's omission was the only other instance. Verified: make check (host suite + lint, green) and CARGO_INCREMENTAL=0 cargo +nightly check --manifest-path rust-modules/Cargo.toml --lib --no-default-features (green). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Bus::drop unconditionally called g_main_loop_unref after LSUnregister, freeing the glib main loop even when LS2 refused to unregister the handle still attached to it — a use-after-free risk on that failure path. Match webos::ls2::Registration::drop's established pattern (Codex review, 2026-09-04): unref only on a successful unregister, otherwise deliberately leak the loop (a bounded, once-per-failed- teardown leak) and log why. This bin crate (plxnative-storage) has no crate::log — it isn't part of the plxnative_modules lib crate — so the leak is logged the same way storage_service/backend.rs's stage_error does, via libc::syslog. No host test can reach this: bus.rs is only pulled into the module tree via `mod service` in src/bin/plxnative-storage.rs, which is `#[cfg(all(target_os = "linux", target_arch = "arm"))]`-gated, so it is absent from the parse tree on macOS/host entirely — not part of `cargo test --lib`, and not even part of a host `cargo check --bin plxnative-storage`. No red/green was possible for this finding; the only thing that can prove this file still compiles is the ARM cross-build (`make`), scheduled after the remaining PR #105 findings. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Copilot review on PR #105, finding 2: RuntimeFailure::LoadTimeout (issue #74 D.1.4's NATIVE_LOAD_BUDGET hang) reused TvPipeline's caption/panel/ readout verbatim ("Playback failed — the TV rejected the stream"), so a firmware REFUSAL and a hang that never got an answer were indistinguishable on a photographed read-out or in the diagnostics panel, even though they already carried distinct FailureKind/code values on the telemetry wire. Test-first: added load_timeout_has_its_own_wording_distinct_from_an_ordinary_tv_refusal, which asserts TvPipeline's and LoadTimeout's ErrorShape caption/panel/ readout differ, and that the timeout's caption says the stream never finished starting rather than "rejected" (a rejection implies a firmware verdict a hang never received). Ran red against the unfixed code: assertion `left != right` failed: a refusal and a hang must not share a caption left: "Playback failed — the TV rejected the stream" right: "Playback failed — the TV rejected the stream" Fixed by giving LoadTimeout's ErrorShape arm its own caption ("Playback failed — the TV did not finish starting the stream"), panel and readout text, keeping its distinct FailureKind::LoadTimeout untouched. Re-ran green (4/4): the new test, runtime_failures_fill_the_existing_readout_reason_slot, and the two player_hud read-out layout tests the coordinator flagged (the_readout_is_centred_and_still_clears_the_transport, the_failed_readout_exposes_only_its_quality_recovery_line_to_pointer) — confirming the geometry/centring contract still holds with the new text. Grepped for the old shared string afterward: the only remaining use is TvPipeline's own arm, as intended. player/engine.rs teardown is untouched, per instruction — this finding is wording only. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Copilot review on PR #105, finding 3: the online profile-switch success path in profile_switch_worker_with_io built its ProfileCreds with extensions: Default::default() unconditionally. extensions is the serde-flatten forward-compat catch-all (OpaqueExtensions, in plex/session.rs) that carries JSON keys a newer build wrote and this one does not model — not ordinary application data — and Session::remember_profile replaces a uuid's cache entry wholesale, so every online switch to an already-cached profile silently discarded whatever that uuid's PRIOR seating had stashed there. Test-first: added online_profile_switch_preserves_the_uuids_existing_cached_extensions, which seeds cached_session()'s "u-kid" entry with a real extensions value, drives the real profile_switch_worker_with_io online-switch success path through a small local ProfileWorkIo mock (OnlineSwitchIo — no network, no thread sleep), and asserts the resulting ProfileDelta.cache keeps that value. It needed a mock trait impl from scratch since only LiveProfileWorkIo existed before. Ran red against the unfixed code: assertion `left == right` failed: the online switch dropped the uuid's previously-cached extensions instead of carrying them forward left: None right: Some(String("kept from an earlier build")) Fixed by looking up the matching uuid's existing extensions out of `stored.profiles` (available because profile_switch_worker_with_io takes `stored: Session` by value) before building `cache`, falling back to Default::default() only when no prior entry exists. Re-ran green, and the full auth:: suite (92 tests) still passes. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Copilot review on PR #105, finding 4: `deploy` never had a path to pkg/plxnative-storage at all — only `ipk` staged it, into usr/palm/services/$(APPID).storage/ (ci/stage-link-evidence.py) — so an iterated fix to storage_service/*.rs could only reach the TV via a full `make install` reinstall. Read the deploy recipe, the ipk storage-staging block and docs/two-installs.md first, per the finding's instruction. The services directory is laid down by `make install` (ci/mkipk.py's stage_storage_service, under the same devmode-writable usr/palm/services/ prefix as APPDIR's usr/palm/applications/), so shipping the binary from `deploy` needed no new registration path — only a way to update a binary LS2 may already have running. Ships pkg/plxnative-storage the same way as sentry-crash: a `.new` + `mv` dance to the new SERVICEDIR, gated on the same refuse-if-uninstalled check `deploy` already runs for APPDIR (now mirrored for SERVICEDIR, pointing at `make install`). Folded into verify-deploy too: a second `cd && md5sum` merged into the one ssh round trip, since ci/verify-deploy.py keys purely by basename and does not care which remote directory a hash came from. Makefile-only change; no Rust test applies. Sanity-checked: `make -s print-app-files`/`print-deploy-files` still expand unchanged (the storage binary was never in APP_FILES/DEPLOY_FILES and still isn't — it ships via its own scp step, same as the crash handler and FFmpeg libraries), and `python3 ci/test_deploy_manifest.py` and `python3 ci/test_verify_deploy.py` stay green. `make -n deploy` itself is blocked by this repo's tv-lock-guard hook even in dry-run mode (it matches on the command text, not on `-n`), so the direct dry-run the finding asked for could not be produced from this session; the two python test suites above are the closest available substitute and both pass unchanged. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
…helper's ACGs Copilot review on PR #105, finding 5. docs/install-and-verify.md:28 and docs/distribution.md:431 (plus two spots in docs/search.md that repeat the same claim) still said appinfo.json declares no requiredPermissions. That stopped being true when the DB8 storage helper landed (8d0b71e, "feat(storage): port DB8 helper and protected Session v2 foundation") — pkg/appinfo.json now reads: "requiredPermissions": ["database.operation", "securitykey.operation"] both ACGs belonging to the storage helper (the local DB8 keystore and the platform key manager it wraps), neither reaching the network or anything outside the app's own data. Updated, each with the specific two ACGs and what they are for rather than just deleting the false claim: - docs/install-and-verify.md:28 — the "you do not need a rooted television" paragraph now names the two ACGs instead of claiming none are declared. - docs/distribution.md:431 — the LS2-media-role paragraph now separates "no requiredPermissions entry is needed for playback itself" (still true, still granted by the Dev Mode LS2 role file) from the storage helper's own entry, which does exist. - docs/search.md:~340 and ~355 — the "Luna route" dead-end account and its provenance line both cited the old "no requiredPermissions" fact as part of why the IME ACGs are unreachable; updated to name the two ACGs that ARE declared (neither an IME group, so the conclusion is unchanged) rather than claiming the field is empty. Deliberately NOT touched: docs/release-audits/v0.1.0.md through v0.6.0.md. Each is a historical snapshot of a specific past release, and "none — appinfo.json declares no requiredPermissions" is accurate for every one of them — 8d0b71e postdates v0.6.0 (46f1f83). Verified with `grep -rn "requiredPermissions" --include="*.md" .` plus a second pass for "no permissions declared"/"declares no ... permission" phrasing: no other current-state doc anywhere in the tree makes this claim. No test: docs-only change, no behavior affected. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Copilot review on PR #105, finding 6. `app/adapters/consent.rs`'s `commit_live`/`forget_live` called `telemetry::persistence::record`/`forget` directly and synchronously — a genuine storage-helper round trip on the television. The caller is the frame loop's own message dispatch (`app::bridge::AppRig::deliver`, reached from `ui/dispatch.rs`'s synchronous `rig.deliver(...)` call), so every consent commit or sign-out blocked the UI thread on disk/storage-helper I/O. Verified as a real regression against `origin/release/v0.6`: there, `telemetry/mod.rs`'s `record_with_receipt`/`forget_with_receipt` (~line 705) built the same `persistence::record_at`/`forget_at` closure and dispatched it through `crate::storage_worker::submit(job)` rather than calling it inline; `persistence.rs`'s `operation_root()` doc comment there says so directly ("Snapshot the canonical destination before an asynchronous operation is queued"). The current tree's simpler `ConsentAdapter`/`ConsentMachine` architecture dropped that dispatch when the receipt/revision scaffolding was not carried forward. Fix: `commit_live`/`forget_live` now submit the write through `crate::storage_worker::submit` (fire-and-forget — dropping the ticket only cancels the caller's interest, not the already-accepted job, per `storage_worker`'s own doc comment) via two new helpers, `persist_record_off_thread`/`persist_forget_off_thread`. In-memory publish, spool purge and native sync stay inline, as before; only the disk/storage- helper round trip moves off-thread. Test-first: added `commit_live_persists_off_the_calling_thread` in `app/adapters/consent.rs`, using a new `#[cfg(test)]` thread-identity probe in `telemetry/persistence.rs` (`last_call_thread()`/`note_call_thread()`) so the assertion is deterministic rather than timing-based. Observed red before the fix: thread '...commit_live_persists_off_the_calling_thread' panicked at src/app/adapters/consent.rs:242:9: assertion `left != right` failed: commit_live must persist off the frame thread, not inline left: Some(ThreadId(2)) right: Some(ThreadId(2)) Green after the fix; also re-ran the full consent/owner/auth/storage_worker test groups (85 + 99 + 92 + 11 passed, 0 failed) to confirm no existing synchronous-durability assertion (notably `app/consent_owner_tests.rs`'s sign-out scenario) broke — each `persist_*_off_thread` helper calls `crate::storage_worker::drain_for_test()` under `#[cfg(test)]` so test assertions still observe the write settled, while production never drains. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
…clear Copilot review on PR #105, finding 7 (verified real regression before fixing). On ARM, telemetry::persistence::forget_at's ARM-only branch defers removing telemetry/consent's own legacy files, relying on a sweep that runs once the session's ClearTenure DB8 mutation is confirmed durable — but the 0.7 forward-port dropped that sweep function and its only caller entirely, so legacy files from 0.6-era installs were never cleaned up on sign-out. Verified against origin/release/v0.6: - rust-modules/src/plex/session.rs:5600-5700, clear_outcome_disk()'s Durable arm called `crate::telemetry::cleanup_after_account_clear()` (ARM-gated) alongside retire_previous_canonical_json/ retire_legacy_probe_artifacts. - rust-modules/src/telemetry/mod.rs and persistence.rs defined cleanup_after_account_clear()/cleanup_after_combined_clear(), which swept telemetry's own legacy candidate paths. In the current tree, grep confirmed both functions and their call site were entirely absent (release/v0.6's other call site, retry_legacy_cleanup_after_clear(), also has no current-tree equivalent and is out of scope — nothing in this tree still calls it). telemetry/persistence.rs's forget_at doc comment still describes relying on this sweep, but nothing performed it. Fix: restore telemetry::cleanup_after_account_clear() (mod.rs, ARM-only) and persistence::cleanup_after_combined_clear() (persistence.rs, simplified to drop v0.6's unverifiable pre-DB8 consent.json wrapper path), and wire the sweep into plex::session::clear()'s Durable arm — the current tree's one real entry point for this cleanup, reached from sign-out via app/adapters/session.rs::erase(). The real ARM defect is compiled out entirely on host (every relevant cfg gates on target_arch = "arm", not(test)), so no historical red was observable on this platform per AGENTS.md's fallback rule. Instead, cleanup_after_combined_clear_removes_every_legacy_candidate pins the restored, directly-callable, non-ARM-gated sweep function; the red here is simulated (the function did not exist before this change, confirmed absent by grep) rather than an observed runtime failure. Verified: cargo +nightly test --lib (3584 passed), cargo +nightly test --lib --features hostsim (3627 passed), both 0 failures; the new test passes in isolation and repeatedly under the full suite. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Once NATIVE_LOAD_BUDGET fired, BACK from the timeout read-out ran teardown, which joined the media thread before sf_unload. When sf_load is genuinely hung inside Starfish (issue #74, k5lp), that join froze the SDL thread. Teardown now parks a timed-out, still-running Load as engine::AbandonedLoad (thread + payload + epoch) in PlayerAdapter, moves the Rust native phase to Abandoned (preserved across reset_session, admits only UNLOADCOMPLETED), and touches nothing on the native object. Native starts are refused while it is parked. reap_abandoned_load, run every frame and at each start, joins the finished thread and runs the unchanged release sequence (Unload -> gate retire -> epoch retire -> D1 or quarantine -> window destroy), now shared with ordinary teardown as release_native_object. A Load that never returns leaks its object. Loads that returned or have not timed out keep the old ordering. Regression test watched red first: teardown blocked 3.01 s until the watchdog released the held host sf_load. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
GLinnik21
marked this pull request as draft
September 16, 2026 22:42
CI's cross-build job was failing at `pkg/plxnative-storage` with FileNotFoundError on the missing .link.map sidecar, even though 04801c2 already added a content-hash fallback for cargo's hashed deps/ output path. `make -j"$(nproc)"` runs the storage helper's `cargo rustc --bin plxnative-storage --no-default-features` and $(RUST_LIB)'s `cargo build --lib` (default features) concurrently, and both pointed at the SAME `--target-dir` (rust-modules/target) -- two differently-configured invocations of the same package sharing one target dir, which rust-modules/.cargo/config.toml's own comment already documents as a hazard ("give a hand-run one its own --target-dir"). CI's rust-cache cannot preserve the -Z build-std sysroot crates (documented in ci.yml), so std/core/alloc are rebuilt fresh by both processes on every run, racing on the shared target dir; the storage cargo invocation's own fingerprint state could observe the other invocation's pass and skip re-invoking arm-cc.py for the final link, leaving no fresh .link.map/.link.trace/.link.json anywhere for stage-link-evidence.py to find, by name or by content. Not reproducible in a from-scratch sequential local build, but confirmed the race is real by tracing the CI log: the storage build's cargo (start 22:42:18) and the lib build's cargo (start 22:43:21) were genuinely overlapping when the failure occurred, both writing into `rust-modules/target`. Fix the mechanism rather than the check: give pkg/plxnative-storage its own target dir (STORAGE_TDIR = $(RUST_TDIR)-storage), so the two concurrent cargo invocations share no fingerprint or deps state at all. Verified with a real ARM cross-build (`make -j`, both artifacts from scratch, ~1m24s), `ci/check-link-evidence.py` against every shipped ELF, `make ipk FLAVOR=debug`, `ci/check-packaged-elf.py` against the built .ipk, and `ci/check-elf.sh` -- all pass. Added the new target-dir shape to .gitignore. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
…arget tree CI run 35162250069 still hit FileNotFoundError on plxnative-storage's .link.map after the dedicated target-storage dir, so the shared --target-dir race was not the (sole) cause. The CI log shows rustc placed the storage binary's own link output under target-storage/.../release/build/plxnative-modules/<hash>/out/ — a directory shaped like a build-script OUT_DIR — instead of the usual release/deps/<crate>-<hash>/ that find_evidence_by_content() only ever globbed. Locally, the same commit produces the deps/ shape (cargo 1.96.1, a pinned nightly); CI installs a floating `nightly` fresh on every run, and -Z build-std's internal output layout for --bin crates is unstable and evidently not fixed even across nightlies on the same cargo. arm-cc.py still writes a correct, fully-validated evidence sidecar beside whatever -o path rustc used; only the fallback's search scope was too narrow to find it there. Widen find_evidence_by_content() to glob recursively under the whole <triple> output tree (walking up from the source to the release/debug directory) instead of assuming deps/, and to also match an exact <crate>.link.json (no hash suffix) for a plain-named internal output. The match is still gated on the recorded elf_sha256 equalling the source's own hash, so this only widens WHERE evidence is looked for, never what counts as valid evidence — check_elf's assertions are unchanged. Added a regression test reproducing the exact CI-observed build/<pkg>/<hash>/out/<crate> shape. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
GLinnik21
marked this pull request as ready for review
September 17, 2026 00:13
Brings in main's test-module splits, #95/#104 plain-HTTP address selection, the CLAUDE.md import change and the landing page. Resolutions: - app/adapters/session.rs: took #95's ConnectionFacts registration (set_connection folded into the register call) and kept the branch's typed CommitAdmission::RegistryOnly reply. - auth.rs, browse/mod.rs, plex/session.rs, screens/consent.rs, screens/profiles.rs: took main's split test-file layout; kept every branch production change. The branch's test edits were carried into the concern files: consent persistence assertions (auth_session_worker_tests), extensions fields (auth_test_support, browse_home_and_tabs_tests, session_test_support, session_profile_cache_tests), the online-switch extensions test (auth_profile_seat_tests), storage_extension_regressions (new auth_storage_extension_tests.rs), trailer_autoplay canonical tests (session_compat_tests), canonical clear/Cleared tests (session_persistence_tests), PIN verifier regressions (session_profile_cache_tests), consent alert title + scope fixture (consent_delete_alert_tests, consent_scope_tests), persistence_warning (profiles_test_support). - plex/session.rs: restored the branch's non-test tail (SaveAuthority, persistence, async_persistence, migration_tests) that sat inside the conflict hunk. - Semantic fixes from #95: probe::plan/settled_probe new arguments in the online-switch test; ProfileCreds.extensions in #95's new session_plaintext_repair_tests and auth/owner.rs test. - ci/check-deps.sh: wholly_test_files now recognises `#[cfg(test)] #[path = "..."] mod x;`, and the threads and libm gates skip wholly-test files as they skip inline test modules — main's split otherwise fails both gates (main's own CI is red on it). Dropped a duplicated unreachable final echo. Test census: every #[test] name count equals base + branch delta + main delta (0 mismatches; 3695 test fns in the merged tree). Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
…n/v0.7-forward-port Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
Brings in #106 (supersampled simulator render scale) and the rewritten beginner install guide. The one conflict, docs/install-and-verify.md, keeps main's new guide and carries this branch's sandbox/ACG paragraph (the storage helper's database.operation and securitykey.operation) under the rooted-vs-Developer-Mode section. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
GLinnik21
added a commit
that referenced
this pull request
Oct 1, 2026
…#367) The signin.started/completed/failed/cancelled usage events have been dropped on every release since 0.7.0. A sign-in always happens before the consent question is asked, and sign-out resets the decision to unanswered, so the allows_usage() gate in diag::event discarded the whole funnel. 0.6.x fixed this (issue #75) by holding a bounded, memory-only, sign-in-only set of events while consent is unanswered and replaying them with their original timestamp and session id once the person answers. That code lived only on release/v0.6 and was not carried over by the 0.7 forward-port (#105). Port just the diag deferral: Stamp, defer, replay_deferred, clear_deferred, DEFERRED_CAP = 8. commit_live replays after publishing the decision, so a "yes" sends the held events and a "no" drops them; forget_live clears, so a held event never crosses to the next account. An answered "no" stays dropped. No boot-time replay: activate_initial publishes the decision before the session adapter can emit a sign-in event. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Forward-port of the 0.6.x storage, sign-in and consent work (through
v0.6.6) into the 0.7 architecture, so that an in-place upgrade keeps sessions, profiles, settings and consent. Draft: required device evidence and several plan batches are still missing. Not for merge.Plan:
docs/v0.7.0-forward-port-plan.md. Evidence per requirement:docs/v0.7.0-forward-port-verification.md(dated rows above "Escalation ledger").What is in it
FreshReauthenticationauthority, fenced only on a readable disk; BACK cannot bypass an unacknowledged persistence warning (AUTH-03/04).asked_version, scopes and declined scopes, and are not downgraded or rewritten on boot. Sign-out still clears them (CONSENT-02 policy-4 half, CONSENT-10 logout half, STORE-09).7060573f): helper/wakeactivation parity with 0.6.6; publish-before-write ordering; one tenure-guarded retry on a CAS conflict; disk-identity restore after a failed fresh write.Verification (host + ARM compile)
tests/fixtures/persistence/generated/, generator patch included) upgraded in place, then restarted: sessions, profiles, settings and consent preserved; interrupted import recovers; sign-out takes precedence; no second write on an idle boot. The consent regression was observed red on137b610bbefore the fix.make check(default + hostsim + harness) and--no-default-featuresgreen on7060573f; ARMmakeexit 0.Not proven / remaining
/wakespecifically triggered it is not logged, so not isolatedasked_version6 kept, ids/epoch/auth_generation kept, relaunch identical (ledger row6ea4e755)run.rswarning routing untestedUncertainfresh-write completion does not restore the disk identity..claude/workflows/swarm-gate.jsorchestration commits from this effort; drop them at squash if they are not wanted onmain.Reauthentication vs data loss: the upgrade fixtures above keep the signed-in session. Where the ledger records a sign-in being required, it names the documented reason; it does not count that as data loss.
🤖 Generated with Claude Code
https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF