Skip to content

[2084 by GPT-5.6 Sol] Bind desktop credentials to strict public instance identity before bearer use - #2086

Merged
integry merged 8 commits into
1953-epic-desktop-transport-apifrom
2084/gpt-5.6-sol-bind-desktop-credentials--20260902-1955-ytg
Sep 3, 2026
Merged

integry merged 8 commits into
1953-epic-desktop-transport-apifrom
2084/gpt-5.6-sol-bind-desktop-credentials--20260902-1955-ytg

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #2084

Branch: 2084/gpt-5.6-sol-bind-desktop-credentials--20260902-1955-ytg
Commits: ✅ Changes committed (5022ab8)


AI Processing Completed

Execution Details:

Summary:
Implemented issue #2084.

Key changes:

  • Added one shared, bounded strict discovery parser rejecting duplicate, missing, extra, malformed, oversized, and noncanonical fields.
  • Removed the permissive client parser; client and CLI now use the shared parser.
  • Persisted public instance identity in encrypted version-2 credentials with profile/origin/generation binding and fail-closed legacy migration.
  • Added credential-free discovery before stored /api/auth/user use, Socket.IO reconnects, pairing, and revocation.
  • Identity mismatch or malformed discovery now sends zero bearer requests, durably detaches the old credential, and requires re-pairing.
  • Preserved main-only Connect identity claims across discovery/confirmation and fenced concurrent tunnel rediscovery.
  • Added adversarial coverage for malformed discovery, relaunch replacement, races, stale sockets, migration, and zero-bearer guarantees.
  • Updated desktop pairing, Connect tunnel, and desktop architecture documentation.
  • Did not modify package-lock.json, workflows, visual geometry, or Windows publication.

Verification passed:

  • Desktop full suite: 363 passed, 25 platform-gated skipped
  • Credential security suite: 72/72
  • Client suite: 69/69
  • CLI discovery tests: 17/17
  • API discovery/status tests: 27/27
  • Shared, client, CLI, desktop, and UI typechecks
  • Linux x64 package build and executable/fuse inspection
  • git diff --check

Graphical packaged Connect smoke was unavailable because this environment lacks Xvfb/D-Bus/keyring helpers.

Detailed Logs:

  • Conversation: 253 messages
  • Session: 01a063b1-c329-7f63-ab1f-449ba23d8664

Log files stored at:

  • conversation: /tmp/claude-logs/issue-2084-2026-09-02T20-31-34-218Z-conversation.json
  • output: /tmp/claude-logs/issue-2084-2026-09-02T20-31-34-218Z-output.txt
Latest Conversation Messages

This PR was created automatically by ProPR after processing issue #2084.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…lic instance

Implemented by ProPR AI using gpt-5.6-sol model.

Implementation completed successfully.
@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned linux-x64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned linux-x64 package
  • Result: failure
  • Commit: 5022ab85adcf (5022ab85adcf169b846549afb714e5acb351e3df)
  • Details: View CI failure

Failure evidence

.github:871
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned linux-arm64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned linux-arm64 package
  • Result: failure
  • Commit: 5022ab85adcf (5022ab85adcf169b846549afb714e5acb351e3df)
  • Details: View CI failure

Failure evidence

.github:871
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Native Windows durability (x64)

Please investigate and fix this CI failure.

  • Check: Native Windows durability (x64)
  • Result: failure
  • Commit: 5022ab85adcf (5022ab85adcf169b846549afb714e5acb351e3df)
  • Details: View CI failure

Failure evidence

.github:870
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned win32-x64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned win32-x64 package
  • Result: failure
  • Commit: 5022ab85adcf (5022ab85adcf169b846549afb714e5acb351e3df)
  • Details: View CI failure

Failure evidence

.github:2659
Process completed with exit code 1.

@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=9 max=3

Correct exact head 5022ab8 for macOS/Linux/shared identity readiness only. First update apps/desktop/scripts/run-native-durability.mjs credential-service expected count from 68 to 72; the total is derived and must become exactly 119. Do not weaken or remove the fail-closed count gate.

Add explicit adversarial assertions for: (1) ProPR Connect rotation from a saved old canonical tunnel origin to a newly rediscovered canonical tunnel origin, proving the new origin/public identity receives a fresh credential generation and transport scope while the old credential, old scope, and old Socket.IO reconnect are never reused or sent; and (2) an identity-specific concurrent switch/rotation race, proving a stale discovery/mismatch cannot detach or activate the replacement generation and that mismatch detaches the exact old credential before any bearer-bearing request. Assert zero old bearer-bearing REST/socket requests before the current strict identity match. Reuse the existing main-owned Connect claim and generation fencing; do not broaden renderer contracts.

Run the focused shared/client/desktop tests and typechecks, npm run test:native-durability -w @propr/desktop, git diff --check, and macOS/Linux packaged Connect/package lanes where available. Do not change package-lock.json, any workflow, release/profile behavior, visual geometry, or Windows code/publication/tests. Windows work is paused and Windows-only red lanes are out of scope. Do not merge. Report exact resulting head and test evidence for independent audit.

@propr-dev propr-dev Bot added the ultrafix label Sep 2, 2026
@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 9/10, max cycles: 3)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Packaged Connect (win32-x64)

Please investigate and fix this CI failure.

  • Check: Packaged Connect (win32-x64)
  • Result: failure
  • Commit: 5022ab85adcf (5022ab85adcf169b846549afb714e5acb351e3df)
  • Details: View CI failure

Failure evidence

.github:6
Process completed with exit code 1.

@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/review

Ultrafix cycle 1: review exact head 5022ab8 only for #2084 strict identity security and macOS/Linux/shared readiness. Confirm the known stale fail-closed native durability count (credential-service 68 expected versus 72 executed, derived total 115 versus 119) and require the two explicit missing adversarial proofs: Connect old-origin to rediscovered new-origin rotation with fresh credential generation/transport scope and zero old bearer/socket reuse; and identity-specific concurrent switch/rotation fencing so a stale mismatch cannot detach/activate the replacement while the exact old credential is detached before bearer use. Preserve the current production design unless review finds a concrete violation. Do not modify workflows, package-lock.json, release/visual behavior, or Windows code/publication/tests. Windows-only failures are out of scope. Do not merge.

@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Packaged Connect (win32-arm64)

Please investigate and fix this CI failure.

  • Check: Packaged Connect (win32-arm64)
  • Result: failure
  • Commit: 5022ab85adcf (5022ab85adcf169b846549afb714e5acb351e3df)
  • Details: View CI failure

Failure evidence

.github:6
Process completed with exit code 1.

@integry integry added the AI label Sep 2, 2026
@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned win32-arm64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned win32-arm64 package
  • Result: failure
  • Commit: 5022ab85adcf (5022ab85adcf169b846549afb714e5acb351e3df)
  • Details: View CI failure

Failure evidence

.github:65
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🛑 Execution Cancelled

The task processing was stopped by user request.

You can post a new comment to restart processing.

@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/review

AI-labeled ultrafix cycle 1. Review exact head 5022ab8 for the scoped #2084 correction already specified in the preceding /ultrafix and /review comments: native durability count 68→72 (derived total 119), explicit Connect old→new tunnel rotation proof, and identity-specific concurrent switch/rotation proof. macOS/Linux/shared only; no workflow, lockfile, visual, release, or Windows changes; do not merge.

@integry integry added AI and removed AI labels Sep 2, 2026
@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/review

SCOPED MACOS/LINUX/SHARED ULTRAFIX REVIEW — exact head 5022ab8. Ignore every automated Windows CI comment and do not modify or rerun Windows work. Review and then correct only: (1) apps/desktop/scripts/run-native-durability.mjs credential-service expected 68→72, derived total exactly 119, gate retained; (2) explicit end-to-end Connect saved old canonical tunnel→rediscovered new canonical tunnel rotation assertion proving fresh credential generation and transport scope, with old credential/scope/socket never reused or sent; (3) identity-specific concurrent switch/rotation assertion proving stale mismatch cannot detach/activate replacement and exact old credential detaches before any bearer. Assert zero old bearer-bearing REST/socket requests before current strict identity match. No workflow, package-lock, release/profile, visual, geometry, or Windows changes. Run focused tests/typechecks/native durability and macOS/Linux checks. Do not merge.

@propr-dev

propr-dev Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR establishes a strong identity-bound credential foundation, but it needs significant changes before merge. The real Connect claim implementation permits old-origin pairing after rotation, concurrent rotations are not fenced through pairing completion, and the native durability gate remains stale. The scoped Linux unsigned validations are also currently failing, although the supplied evidence does not trace those failures to PR-changed code.

✅ Strict shared discovery parsing — The shared wire parser rejects duplicate members, oversized payloads, malformed JSON, and noncanonical schema values consistently across CLI and client consumers.

✅ Identity-bound credential storage — Version-2 credentials bind the profile, canonical origin, public identity, and token, while legacy unbound credentials fail closed.

✅ Socket reconnect verification — WebSocket reconnects perform unauthenticated discovery and cancel without attaching a bearer when identity validation fails.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Native durability count remains stale

  • Required behavior: The retained fail-closed native durability gate must expect 72 credential-service tests and derive an exact total of 119.
  • Evidence: apps/desktop/src/credential-service.test.ts:147 — the PR adds four top-level credential-service tests, increasing the suite from 68 to 72, but the diff contains no corresponding update to apps/desktop/scripts/run-native-durability.mjs.
  • Minimum fix: Change only the credential-service expected count from 68 to 72, retain the equality gate, and verify the derived total is exactly 119.

F2: 🔴 Rotated Connect origin bypasses its claim

  • Required behavior: A saved Connect profile rotated from an old canonical tunnel to a newly rediscovered canonical tunnel must accept pairing only for the current main-owned origin and identity, with a fresh credential generation and transport scope and no old credential, scope, or socket reuse.
  • Evidence: apps/desktop/src/connect-discovery.ts:95 — expectedPublicInstanceIdentity() returns null when a claim exists for the profile but its origin differs; apps/desktop/src/credential-service.ts:549 — pairing treats null as unrestricted and rejects only a non-null unequal identity. Consequently, after rediscovery publishes the new origin, renderer input using the old origin bypasses the claim entirely.
  • Minimum fix: Distinguish “no Connect claim” from “this claimed profile has the wrong origin” and reject the latter before pairing. Add the requested end-to-end saved-old-tunnel → rediscovered-new-tunnel test proving a new credential generation and transport scope and zero reuse or transmission of the old bearer, scope, and socket.

F3: 🔴 Connect rotation does not fence pairing

  • Required behavior: Identity-specific concurrent switch or rotation must prevent stale discovery from committing or activating a superseded pairing generation, while exact-old-credential detachment occurs before any bearer-bearing REST or socket request.
  • Evidence: apps/desktop/src/connect-discovery.ts:44 — Connect claim changes are tracked only by the discovery service’s private generation; apps/desktop/src/credential-service.ts:548 — pairing snapshots the expected identity once before the asynchronous pairing protocol, while subsequent currency checks use only credential-service profile and selection generations. A concurrent rediscovery can therefore replace the Connect claim without invalidating the already-running old-origin pairing.
  • Minimum fix: Carry a main-owned claim generation through pairing and revalidate it before activation and credential commit, or otherwise invalidate the profile operation when its Connect claim rotates. Add a deferred concurrent test proving the stale operation cannot detach or activate the replacement, the exact old credential is detached, and no old bearer-bearing REST or socket request occurs before the current strict identity match.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The strict parser, fail-closed migration, and socket identity gate are solid, but two Connect identity-boundary defects and the deterministic durability-count failure remain. The unexplained current Linux validation failures further prevent merge readiness within the requested scope.

Score: 5/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 2m 47s
  • Tokens: 73,089 (64,159 in / 8,930 out)
  • Cost: $0.54

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@integry integry added AI and removed AI labels Sep 2, 2026
@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/fix F1 F2 F3

SCOPED MACOS/LINUX/SHARED FIX on exact head 5022ab8. Ignore all automated Windows CI comments; do not modify or rerun Windows work. F1: change only native durability credential-service expected 68→72 so derived total is exactly 119; retain exact equality gate. F2: eliminate null-means-unrestricted ambiguity—distinguish no main-owned Connect claim from a claimed profile presented at the wrong/stale origin, and reject the stale origin before pairing. F3: carry an unforgeable main-owned Connect claim generation/snapshot through pairing and revalidate it immediately before server activation and durable credential commit; concurrent rotation must cancel/clean up the stale pairing without detaching or activating the replacement. Add the exact old→new Connect rotation and deferred concurrent rotation assertions requested above, proving fresh credential generation/transport scope and zero old bearer/scope/socket reuse or transmission before current identity match. Preserve manual HTTPS/loopback pairing when no Connect claim exists. No workflow, package-lock, release/profile, visual/geometry, or Windows changes. Run focused shared/client/desktop tests/typechecks, native durability, diff-check, and macOS/Linux checks. Do not merge.

@propr-dev

propr-dev Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit df077c2

Addressed 1 AI review comment (IDs: 5516247919)

Summary of Changes

Implemented F1–F3 on exact head 5022ab85; no commit or merge performed.

  • Updated native durability expectation to 72, preserving exact equality at 119 total.
  • Added explicit unclaimed, claimed, and stale-origin Connect states.
  • Added main-owned claim generations and per-profile commit fencing.
  • Revalidated claim snapshots before activation and durable publication.
  • Added old→new and deferred concurrent-rotation coverage proving fresh credentials/scopes and no stale bearer, scope, socket, activation, or commit reuse.
  • Preserved manual HTTPS/loopback pairing without a Connect claim.

Verification passed:

  • Shared typecheck/build
  • Client typecheck and 69/69 tests
  • Desktop typecheck and focused 76/76 tests
  • Native durability: exact 119/119
  • Linux x64 package and executable/fuse inspection
  • Portable Darwin verification: 2 passed; 1 native-macOS-only check skipped on Linux
  • git diff --check

Only six scoped desktop files changed. No Windows, workflow, lockfile, release/profile, visual, or geometry changes.


🤖 Implementation Details

  • Model: GPT-5.6 Sol (high)
  • Requested By: @integry
  • Time: 21m 54s
  • Tokens: 6,044,720 (6,011,868 in / 32,852 out)
  • Cost: $4.90

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 5516273937✓

…rge performed.

Implemented F1–F3 on exact head `5022ab85`; no commit or merge performed.

- Updated native durability expectation to 72, preserving exact equality at 119 total.
- Added explicit unclaimed, claimed, and stale-origin Connect states.
- Added main-owned claim generations and per-profile commit fencing.
- Revalidated claim snapshots before activation and durable publication.
- Added old→new and deferred concurrent-rotation coverage proving fresh credentials/scopes and no stale bearer, scope, socket, activation, or commit reuse.
- Preserved manual HTTPS/loopback pairing without a Connect claim.

Verification passed:

- Shared typecheck/build
- Client typecheck and 69/69 tests
- Desktop typecheck and focused 76/76 tests
- Native durability: exact 119/119
- Linux x64 package and executable/fuse inspection
- Portable Darwin verification: 2 passed; 1 native-macOS-only check skipped on Linux
- `git diff --check`

Only six scoped desktop files changed. No Windows, workflow, lockfile, release/profile, visual, or geometry changes.

PR: #2086
Comment by: @integry (ID: 5516273937)
Model: gpt-5.6-sol
@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR substantially improves desktop credential binding, strict discovery parsing, and Connect claim generation handling, but it is not ready to merge. Three PR-introduced lifecycle and timeout defects remain and require significant correction.

✅ Strict shared parsing — CLI and client discovery now share a bounded parser that rejects duplicate, malformed, oversized, and noncanonical documents.

✅ Identity-bound credentials — Version-2 credentials bind profile, origin, public instance identity, and token, while legacy unbound credentials fail closed.

✅ Requested regressions covered — Native durability is correctly gated at 72 credential-service tests and 119 total, and packaged fixtures correctly map first to AAA and second to BBB.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F6: 🔴 Pending claims survive failed discovery

  • Required behavior: Pending discovery state must be non-committable only while discovery is unresolved, then clean up without damaging the replacement or permanently blocking manual HTTPS/loopback profiles.
  • Evidence: apps/desktop/src/connect-discovery.ts:87 — #beginClaimIntent publishes pending state before profile lookup and native discovery, but missing profiles, non-Connect profiles, invalid results, stale results, and thrown discovery calls all exit without conditionally clearing that pending intent.
  • Minimum fix: Finalize every unsuccessful intent in generation-checked cleanup, ensuring an older operation cannot clear a newer pending intent and ensuring the prior active snapshot remains fenced. Add coverage for rejected discovery, invalid status, missing/non-Connect profiles, and stale completion.

F7: 🔴 Discovery generation crosses profile scopes

  • Required behavior: Per-profile discovery and claim publication must serialize within the affected profile without unrelated profile operations cancelling valid discovery.
  • Evidence: apps/desktop/src/connect-discovery.ts:66 — #discoveryGeneration is one service-wide scalar, and both discover and every rediscover(profileId) increment and compare it even though claim intents, locks, and snapshots are keyed by profile.
  • Minimum fix: Scope discovery freshness by profile, or rely on the existing per-profile intent generation, and add a deferred test proving distinct profile discoveries cannot cancel or strand each other.

F8: 🔴 Discovery timeout excludes response headers

  • Required behavior: Credential-free discovery must remain bounded and preserve the discoverDesktop(timeoutMs) timeout contract so probe, pairing, revocation, and socket reconnect cannot hang indefinitely.
  • Evidence: packages/client/src/client.ts:238 — the code awaits this.fetch(...) before creating bodyTimer; a server that accepts the request but never returns headers bypasses timeoutMs entirely.
  • Minimum fix: Start the deadline before initiating fetch, combine it with caller cancellation, and race or abort both the header and body phases while retaining credential omission, manual redirects, bounded reads, and correct timeout/abort error classification.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The identity-binding design and adversarial coverage are strong, but the pending-state leaks, cross-profile generation interference, and unbounded header wait are merge-blocking regressions. Current non-Windows checks are also still pending.

Score: 5/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 3m 47s
  • Tokens: 82,931 (70,557 in / 12,374 out)
  • Cost: $0.68

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@integry integry added the AI label Sep 2, 2026
@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/fix F6 F7 F8

Mac/Linux/shared only on exact head f5649ed. F6: generation-conditionally finalize every unsuccessful Connect claim intent (thrown/invalid native discovery, missing/non-Connect profile, stale completion) so pending is cleared only by its owning current intent; retain the prior claim but keep pre-intent active snapshots fenced, and prove manual HTTPS/loopback is not permanently blocked. F7: remove service-wide cross-profile discovery cancellation; use per-profile/fixed-discovery intent generations and add deferred independent-profile overlap coverage, including stale same-profile completion. F8: enforce one caller-visible timeout/cancellation deadline beginning before header fetch and covering header plus bounded body reads even if a fetch/stream implementation ignores AbortSignal; abort/dispose safely and retain credential omission, manual redirect, strict bounded/fatal-UTF8 parsing, and exact timeout-vs-abort classification. Add adversarial never-headers and headers-then-stall tests. Preserve F4/F5 fences, exact 72/119 durability, first→AAA/second→BBB, manual unclaimed pairing, and no workflow/lock/release/Windows changes. Run focused client/connect/credential/native durability tests and Mac/Linux package gates. Do not merge.

@propr-dev

propr-dev Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🛑 Execution Cancelled

The task processing was stopped by user request.

You can post a new comment to restart processing.

@integry integry removed the AI label Sep 2, 2026
@integry integry added the AI label Sep 2, 2026
@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/review

Final Mac/Linux/shared review of exact head a82b926. Re-evaluate all F1–F8: strict shared bounded identity parsing before bearer; persisted profile/origin/identity/generation/scope binding; synchronous old REST/socket/scope fencing at Connect rotation intent; non-committable pending claims; generation-conditional cleanup on every failed/stale exit; independent per-profile discovery; and one end-to-end header+body deadline that settles even for ignored AbortSignal while preserving exact timeout/caller-abort classification. Confirm exact 72/119 durability, first→AAA/second→BBB fixtures, manual unclaimed HTTPS/loopback, no workflow/lock/release/Windows drift, and no new lifecycle leaks. Goal >=9. Ignore Windows-only lanes. Do not merge.

@propr-dev

propr-dev Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@integry integry removed the AI label Sep 2, 2026
@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR substantially implements strict identity-bound desktop authentication, but two focused correctness issues remain, so it is not ready to merge.

✅ Strict credential-free discovery — Shared parsing rejects oversized, duplicate, malformed, extra, and noncanonical discovery data before bearer use, with fatal UTF-8 decoding and bounded body reads.

✅ Connect rotation fencing — Per-profile intent generations, non-committable pending snapshots, commit serialization, and generation-conditional cleanup fence stale REST, socket reconnect, and transport-scope activation paths.

✅ Scoped verification updates — Durability is gated at exactly 72 credential-service tests and 119 total tests; packaged fixtures map first→AAA and second→BBB. The diff contains no workflow, lockfile, release-profile, or Windows-specific drift. Current scoped checks report no failures, although several macOS/Linux checks remain pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F9: 🔴 Early exits retain mismatched credentials

  • Required behavior: A valid discovery document whose public instance identity differs from the persisted credential must durably detach that credential without sending its bearer.
  • Evidence: apps/desktop/src/credential-service.ts:756 and apps/desktop/src/credential-service.ts:835 — compatibility and newly added capability/Connect-claim exits occur before the persisted credential identity comparison and #detachIdentityFailedCredential. A replacement returning a different identity plus incompatible compatibility metadata or disabled authentication capability leaves the old credential stored indefinitely.
  • Minimum fix: After successful strict discovery and while the probe generation remains current, compare any readable current credential with discovery.publicInstanceIdentity and generation-conditionally detach a mismatch before returning incompatibility or capability results. Add mismatched-identity regressions for both early-return paths, asserting zero bearer transmission and a null stored credential.

F10: 🔴 Late header responses are not disposed

  • Required behavior: The new end-to-end discovery deadline must safely dispose resources when fetch ignores AbortSignal, including without introducing a lifecycle leak after timeout or caller cancellation.
  • Evidence: packages/client/src/client.ts:269 — the fetch promise is passed directly into Promise.race; if the deadline wins and an AbortSignal-ignoring fetch later resolves with a streaming Response, no continuation observes or cancels that response body.
  • Minimum fix: Retain the fetch operation and attach guarded late-settlement cleanup that cancels a response body when timeout or caller cancellation already won, without canceling the accepted response. Add deferred late-header tests for both timeout and caller abort.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The core security model and adversarial coverage are strong, but the missed mismatch-detachment path and late-response resource leak violate explicit changed-behavior invariants. Both appear locally correctable.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 4m 16s
  • Tokens: 84,400 (70,464 in / 13,936 out)
  • Cost: $0.77

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Full Test Suite Results

Validation failed during: Full test suite.

  • Dependency install: success
  • Workspace build: success
  • Docs validation: success
  • Redis startup: success
  • Full test suite: failure
View Test Output

> [email protected] test:full:prepared
> npm run test:server


> [email protected] test:server
> node scripts/run-test-suite.mjs


[1/361] apps/desktop/scripts/assert-windows-mvp-package.test.mjs
TAP version 13
# Subtest: Windows MVP ASAR main entry
    # Subtest: uses the rooted listPackage representation accepted by extractFile
    ok 1 - uses the rooted listPackage representation accepted by extractFile
      ---
      duration_ms: 27.164027
      type: 'test'
      ...
    # Subtest: preserves the Windows separator after removing the one archive root
    ok 2 - preserves the Windows separator after removing the one archive root
      ---
      duration_ms: 0.206161
      type: 'test'
      ...
    # Subtest: rejects traversal, duplicate entries, and case-colliding main paths
    ok 3 - rejects traversal, duplicate entries, and case-colliding main paths
      ---
      duration_ms: 0.619776
      type: 'test'
      ...
    1..3
ok 1 - Windows MVP ASAR main entry
  ---
  duration_ms: 28.897235
  type: 'suite'
  ...
1..1
# tests 3
# suites 1
# pass 3
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 294.476939

[2/361] apps/desktop/scripts/build-windows-machine-installer.test.mjs
TAP version 13
# Subtest: sets explicit Windows-1252 MSI and summary code pages in probe and production WXS
ok 1 - sets explicit Windows-1252 MSI and summary code pages in probe and production WXS
  ---
  duration_ms: 1.8206
  type: 'test'
  ...
# Subtest: accepts the exact MSI ProductVersion boundary and retains version and upgrade identity in WXS
ok 2 - accepts the exact MSI ProductVersion boundary and retains version and upgrade identity in WXS
  ---
  duration_ms: 0.525864
  type: 'test'
  ...
# Subtest: rejects every unsupported ProductVersion at the direct installer builder entry point
ok 3 - rejects every unsupported ProductVersion at the direct installer builder entry point
  ---
  duration_ms: 1.937596
  type: 'test'
  ...
# Subtest: uses per-machine scope without explicitly authoring the derived ALLUSERS property
ok 4 - uses per-machine scope without explicitly authoring the derived ALLUSERS property
  ---
  duration_ms: 0.503701
  type: 'test'
  ...
# Subtest: authors the complete per-machine Start Menu contract for x64 and ARM64
ok 5 - authors the complete per-machine Start Menu contract for x64 and ARM64
  ---
  duration_ms: 1.045329
  type: 'test'
  ...
# Subtest: selects only the installed x64 WiX directory or an explicit ARM64 build directory
ok 6 - selects only the installed x64 WiX directory or an explicit ARM64 build directory
  ---
  duration_ms: 0.773268
  type: 'test'
  ...
# Subtest: uses a ten-minute timeout only for production Light
ok 7 - uses a ten-minute timeout only for production Light
  ---
  duration_ms: 0.327054
  type: 'test'
  ...
# Subtest: keeps WiX processes and their emitted diagnostics bounded
ok 8 - keeps WiX processes and their emitted diagnostics bounded
  ---
  duration_ms: 0.190868
  type: 'test'
  ...
# Subtest: emits WiX v3 default registry values without empty Name attributes
ok 9 - emits WiX v3 default registry values without empty Name attributes
  ---
  duration_ms: 0.587808
  type: 'test'
  ...
1..9
# tests 9
# suites 0
# pass 9
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 230.88506

[3/361] apps/desktop/scripts/packaged-connect-lifecycle.test.mjs
TAP version 13
# Subtest: packaged Connect bounded child lifecycle
    # Subtest: accepts an exact ready proof followed by a clean exit
    ok 1 - accepts an exact ready proof followed by a clean exit
      ---
      duration_ms: 5.029497
      type: 'test'
      ...
    # Subtest: forces a ready app with a hung descendant through an exact bounded taskkill invocation
    ok 2 - forces a ready app with a hung descendant through an exact bounded taskkill invocation
      ---
      duration_ms: 8.041776
      type: 'test'
      ...
    # Subtest: keeps timeout-before-ready primary while terminating and draining the tree
    ok 3 - keeps timeout-before-ready primary while terminating and draining the tree
      ---
      duration_ms: 15.692442
      type: 'test'
      ...
    # Subtest: classifies asynchronous spawn errors without exposing their message
    ok 4 - classifies asynchronous spawn errors without exposing their message
      ---
      duration_ms: 5.804737
      type: 'test'
      ...
    # Subtest: settles close/timeout races once and never upgrades an early exit to success
    ok 5 - settles close/timeout races once and never upgrades an early exit to success
      ---
      duration_ms: 0.723022
      type: 'test'
      ...
    # Subtest: accepts a clean post-proof close racing a taskkill no-process result
    ok 6 - accepts a clean post-proof close racing a taskkill no-process result
      ---
      duration_ms: 6.262509
      type: 'test'
      ...
    # Subtest: rejects malformed, partial, truncated, and extra-field ready records
    ok 7 - rejects malformed, partial, truncated, and extra-field ready records
      ---
      duration_ms: 11.79128
      type: 'test'
      ...
    # Subtest: terminates an exact-event record whose platform proof is invalid
    ok 8 - terminates an exact-event record whose platform proof is invalid
      ---
      duration_ms: 1.203648
      type: 'test'
      ...
    # Subtest: fails after proof when Windows tree termination cannot be proven
    ok 9 - fails after proof when Windows tree termination cannot be proven
      ---
      duration_ms: 6.593038
      type: 'test'
      ...
    # Subtest: never returns secret-bearing raw output or non-allowlisted record fields
    ok 10 - never returns secret-bearing raw output or non-allowlisted record fields
      ---
      duration_ms: 1.867861
      type: 'test'
      ...
    # Subtest: revokes success when sensitive output arrives after the exact ready proof
    ok 11 - revokes success when sensitive output arrives after the exact ready proof
      ---
      duration_ms: 1.042885
      type: 'test'
      ...
    # Subtest: rejects a JSON-escaped Windows path in a non-allowlisted record before readiness
    ok 12 - rejects a JSON-escaped Windows path in a non-allowlisted record before readiness
      ---
      duration_ms: 1.758837
      type: 'test'
      ...
    # Subtest: revokes success for a JSON-escaped Windows path after the exact ready proof
    ok 13 - revokes success for a JSON-escaped Windows path after the exact ready proof
      ---
      duration_ms: 1.237539
      type: 'test'
      ...
    # Subtest: revokes success when a JSON-escaped Windows path follows the record-count cap
    ok 14 - revokes success when a JSON-escaped Windows path follows the record-count cap
      ---
      duration_ms: 3.311462
      type: 'test'
      ...
    # Subtest: revokes success when a JSON-escaped Windows path follows the byte cap
    ok 15 - revokes success when a JSON-escaped Windows path follows the byte cap
      ---
      duration_ms: 10.279706
      type: 'test'
      ...
    1..15
ok 1 - packaged Connect bounded child lifecycle
  ---
  duration_ms: 82.537585
  type: 'suite'
  ...
# Subtest: packaged Connect fixture cleanup
    # Subtest: retries a transient Windows EBUSY only inside the authorized fixture
    ok 1 - retries a transient Windows EBUSY only inside the authorized fixture
      ---
      duration_ms: 5.968775
      type: 'test'
      ...
    # Subtest: redacts cleanup failure and preserves the primary lifecycle outcome
    ok 2 - redacts cleanup failure and preserves the primary lifecycle outcome
      ---
      duration_ms: 1.042895
      type: 'test'
      ...
    # Subtest: bounds a never-settling removal and preserves the primary result
    ok 3 - bounds a never-settling removal and preserves the primary result
      ---
      duration_ms: 10.154938
      type: 'test'
      ...
    # Subtest: bounds a never-settling authorization call as a fixed cleanup failure
    ok 4 - bounds a never-settling authorization call as a fixed cleanup failure
      ---
      duration_ms: 10.94401
      type: 'test'
      ...
    # Subtest: isolates default Windows filesystem cleanup from the harness process
    ok 5 - isolates default Windows filesystem cleanup from the harness process
      ---
      duration_ms: 45.258599
      type: 'test'
      ...
    # Subtest: refuses a link, renamed leaf, or fixture outside the canonical temporary parent
    ok 6 - refuses a link, renamed leaf, or fixture outside the canonical temporary parent
      ---
      duration_ms: 0.802823
      type: 'test'
      ...
    1..6
ok 2 - packaged Connect fixture cleanup
  ---
  duration_ms: 74.642225
  type: 'suite'
  ...
1..2
# tests 21
# suites 2
# pass 21
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 376.639593

[4/361] apps/desktop/scripts/packaged-layout.test.mjs
TAP version 13
# Subtest: packaged desktop event parsing
    # Subtest: returns the first full record for the exact matching event
    ok 1 - returns the first full record for the exact matching event
      ---
      duration_ms: 1.268476
      type: 'test'
      ...
    # Subtest: returns undefined when the event is absent
    ok 2 - returns undefined when the event is absent
      ---
      duration_ms: 0.172641
      type: 'test'
      ...
    1..2
ok 1 - packaged desktop event parsing
  ---
  duration_ms: 2.292622
  type: 'suite'
  ...
# Subtest: packaged desktop layout assertions
    # Subtest: retains the exact 1280x820 Linux Xvfb proof
    ok 1 - retains the exact 1280x820 Linux Xvfb proof
      ---
      duration_ms: 0.956394
      type: 'test'
      ...
    # Subtest: accepts a safe 1024x720 Windows display clamp with intact contained content
    ok 2 - accepts a safe 1024x720 Windows display clamp with intact contained content
      ---
      duration_ms: 0.192951
      type: 'test'
      ...
    # Subtest: rejects unsafe Windows clamps and content outside the visible work area
    ok 3 - rejects unsafe Windows clamps and content outside the visible work area
      ---
      duration_ms: 0.203267
      type: 'test'
      ...
    1..3
ok 2 - packaged desktop layout assertions
  ---
  duration_ms: 1.605996
  type: 'suite'
  ...
1..2
# tests 5
# suites 2
# pass 5
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 238.3099

[5/361] apps/desktop/scripts/packaged-smoke-support.test.mjs
TAP version 13
# Subtest: packaged smoke native window layout
    # Subtest: accepts the preferred size while retaining responsive containment
    ok 1 - accepts the preferred size while retaining responsive containment
      ---
      duration_ms: 1.532234
      type: 'test'
      ...
    # Subtest: accepts the 1024x720-clamped size while retaining responsive containment
    ok 2 - accepts the 1024x720-clamped size while retaining responsive containment
      ---
      duration_ms: 0.188475
      type: 'test'
      ...
    # Subtest: accepts the configured minimum size while retaining responsive containment
    ok 3 - accepts the configured minimum size while retaining responsive containment
      ---
      duration_ms: 0.153663
      type: 'test'
      ...
    # Subtest: accepts the undersized work area while retaining responsive containment
    ok 4 - accepts the undersized work area while retaining responsive containment
      ---
      duration_ms: 0.143226
      type: 'test'
      ...
    # Subtest: rejects an unclamped window or a viewport inconsistent with native content chrome
    ok 5 - rejects an unclamped window or a viewport inconsistent with native content chrome
      ---
      duration_ms: 0.621779
      type: 'test'
      ...
    # Subtest: accepts actual reduced native sizing only when both minimum constraints are exercised
    ok 6 - accepts actual reduced native sizing only when both minimum constraints are exercised
      ---
      duration_ms: 0.275336
      type: 'test'
      ...
    1..6
ok 1 - packaged smoke native window layout
  ---
  duration_ms: 4.389189
  type: 'suite'
  ...
# Subtest: packaged smoke child environment
    # Subtest: defines four isolated launches with exact per-mode environment, argv, and marker contracts
    ok 1 - defines four isolated launches with exact per-mode environment, argv, and marker contracts
      ---
      duration_ms: 1.785907
      type: 'test'
      ...
    # Subtest: passes only platform launch inputs and private profile paths from a hostile parent
    ok 2 - passes only platform launch inputs and private profile paths from a hostile parent
      ---
      duration_ms: 18.085932
      type: 'test'
      ...
    # Subtest: keeps cleanup bounded to the generated profile root
    ok 3 - keeps cleanup bounded to the generated profile root
      ---
      duration_ms: 12.164739
      type: 'test'
      ...
    # Subtest: accepts only a normalized absolute Windows SystemRoot directory
    ok 4 - accepts only a normalized absolute Windows SystemRoot directory
      ---
      duration_ms: 1.878677
      type: 'test'
      ...
    # Subtest: contains no parent environment spread, enumeration, denylist, PATH, or shell launch
    ok 5 - contains no parent environment spread, enumeration, denylist, PATH, or shell launch
      ---
      duration_ms: 1.82775
      type: 'test'
      ...
    # Subtest: serves each named fixture identity paired with its persisted credential
    ok 6 - serves each named fixture identity paired with its persisted credential
      ---
      duration_ms: 1.436841
      type: 'test'
      ...
    # Subtest: requires the adjacent packaged spawn options with LF or CRLF source
    ok 7 - requires the adjacent packaged spawn options with LF or CRLF source
      ---
      duration_ms: 2.11882
      type: 'test'
      ...
    1..7
ok 2 - packaged smoke child environment
  ---
  duration_ms: 39.915549
  type: 'suite'
  ...
1..2
# tests 13
# suites 2
# pass 13
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 283.742727

[6/361] apps/desktop/scripts/release-architecture.test.mjs
TAP version 13
# Subtest: machine-wide Windows artifacts require a real MSI compound file
ok 1 - machine-wide Windows artifacts require a real MSI compound file
  ---
  duration_ms: 8.173515
  type: 'test'
  ...
# Subtest: administrative MSI payload inspection
    # Subtest: uses exact fixed native extractor argv and minimal environments
    ok 1 - uses exact fixed native extractor argv and minimal environments
      ---
      duration_ms: 1.346633
      type: 'test'
      ...
    # Subtest: accepts only the canonical application with the one administrative root prefix
    ok 2 - accepts only the canonical application with the one administrative root prefix
      ---
      duration_ms: 9.825271
      type: 'test'
      ...
    # Subtest: rejects path escapes and case collisions from the Linux listing before extraction
    ok 3 - rejects path escapes and case collisions from the Linux listing before extraction
      ---
      duration_ms: 0.778015
      type: 'test'
      ...
    # Subtest: uses fixed missing and duplicate canonical-app codes with bounded counts
    ok 4 - uses fixed missing and duplicate canonical-app codes with bounded counts
      ---
      duration_ms: 8.880513
      type: 'test'
      ...
    # Subtest: distinguishes authority resources, unsafe trees, and architecture mismatch without path data
    ok 5 - distinguishes authority resources, unsafe trees, and architecture mismatch without path data
      ---
      duration_ms: 9.175279
      type: 'test'
      ...
    # Subtest: maps extractor failures to one redacted tool code
    ok 6 - maps extractor failures to one redacted tool code
      ---
      duration_ms: 2.492475
      type: 'test'
      ...
    # Subtest: retains compound-file, per-machine scope, and canonical PE evidence across extraction
    ok 7 - retains compound-file, per-machine scope, and canonical PE evidence across extraction
      ---
      duration_ms: 4.129838
      type: 'test'
      ...
    # Subtest: fails closed on extractor nonzero, stderr, output overflow, and timeout
    ok 8 - fails closed on extractor nonzero, stderr, output overflow, and timeout
      ---
      duration_ms: 142.641386
      type: 'test'
      ...
    1..8
ok 2 - administrative MSI payload inspection
  ---
  duration_ms: 180.236401
  type: 'suite'
  ...
# Subtest: DEB and RPM executable layouts
    # Subtest: accept only the canonical regular ELF payload and documented launcher symlink
    ok 1 - accept only the canonical regular ELF payload and documented launcher symlink
      ---
      duration_ms: 15.893475
      type: 'test'
      ...
    # Subtest: reject missing and extra payload names for both package formats
    ok 2 - reject missing and extra payload names for both package formats
      ---
      duration_ms: 13.28774
      type: 'test'
      ...
    # Subtest: reject unexpected same-name file types and non-ELF or cross-architecture payloads
    ok 3 - reject unexpected same-name file types and non-ELF or cross-architecture payloads
      ---
      duration_ms: 17.554445
      type: 'test'
      ...
    # Subtest: reject launcher escapes, cycles, and targets other than the canonical payload
    ok 4 - reject launcher escapes, cycles, and targets other than the canonical payload
      ---
      duration_ms: 12.918742
      type: 'test'
      ...
    # Subtest: reject special files with the executable name
    ok 5 - reject special files with the executable name
      ---
      duration_ms: 11.457485
      type: 'test'
      ...
    1..5
ok 3 - DEB and RPM executable layouts
  ---
  duration_ms: 71.542368
  type: 'suite'
  ...
# Subtest: DMG application layout
    # Subtest: accepts the real Forge tree with its install link and nested Electron helper bundles
    ok 1 - accepts the real Forge tree with its install link and nested Electron helper bundles
      ---
      duration_ms: 13.077563
      type: 'test'
      ...
    # Subtest: rejects a symbolic-link canonical helper bundle
    ok 2 - rejects a symbolic-link canonical helper bundle
      ---
      duration_ms: 7.334183
      type: 'test'
      ...
    # Subtest: rejects a symbolic-link canonical helper executable ancestor
    ok 3 - rejects a symbolic-link canonical helper executable ancestor
      ---
      duration_ms: 7.133099
      type: 'test'
      ...
    # Subtest: rejects every symbolic link outside canonical framework internals
    ok 4 - rejects every symbolic link outside canonical framework internals
      ---
      duration_ms: 10.026444
      type: 'test'
      ...
    # Subtest: rejects escaping, cyclic, missing, and case-mismatched framework symbolic links
    ok 5 - rejects escaping, cyclic, missing, and case-mismatched framework symbolic links
      ---
      duration_ms: 37.613271
      type: 'test'
      ...
    # Subtest: never treats Linux 7z sanitized install-link output as native layout evidence
    ok 6 - never treats Linux 7z sanitized install-link output as native layout evidence
      ---
      duration_ms: 10.021587
      type: 'test'
      ...
    # Subtest: rejects wrong bundles, alternate same-name executables, and canonical symlink escapes
    ok 7 - rejects wrong bundles, alternate same-name executables, and canonical symlink escapes
      ---
      duration_ms: 14.766934
      type: 'test'
      ...
    # Subtest: rejects alternate top-level application bundles
    ok 8 - rejects alternate top-level application bundles
      ---
      duration_ms: 6.258633
      type: 'test'
      ...
    # Subtest: rejects unsafe links inside the canonical application bundle
    ok 9 - rejects unsafe links inside the canonical application bundle
      ---
      duration_ms: 9.729846
      type: 'test'
      ...
    # Subtest: rejects non-helper nested application bundles
    ok 10 - rejects non-helper nested application bundles
      ---
      duration_ms: 12.258576
      type: 'test'
      ...
    # Subtest: rejects case-colliding top-level entries when the filesystem permits them
    ok 11 - rejects case-colliding top-level entries when the filesystem permits them
      ---
      duration_ms: 6.658086
      type: 'test'
      ...
    # Subtest: rejects special files inside the canonical application bundle
    ok 12 - rejects special files inside the canonical application bundle
      ---
      duration_ms: 14.295001
      type: 'test'
      ...
    1..12
ok 4 - DMG application layout
  ---
  duration_ms: 149.876445
  type: 'suite'
  ...
1..4
# tests 26
# suites 3
# pass 26
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 625.574677

[7/361] apps/desktop/scripts/release-artifacts.test.mjs
TAP version 13
# Subtest: desktop release artifacts
    # Subtest: stages named artifacts and finalizes unsigned validation metadata
    ok 1 - stages named artifacts and finalizes unsigned validation metadata
      ---
      duration_ms: 94.982948
      type: 'test'
      ...
    # Subtest: rejects extensionless, doubled-extension, case-conflicting, duplicate, wrong-kind, stale, and mixed-target names
    ok 2 - rejects extensionless, doubled-extension, case-conflicting, duplicate, wrong-kind, stale, and mixed-target names
      ---
      duration_ms: 240.641366
      type: 'test'
      ...
    # Subtest: rejects altered DMG bytes even when fragment artifact metadata is rewritten
    ok 3 - rejects altered DMG bytes even when fragment artifact metadata is rewritten
      ---
      duration_ms: 25.809273
      type: 'test'
      ...
    # Subtest: rejects permanent DMG replacement or in-place mutation during held inspection without emitting evidence
    ok 4 - rejects permanent DMG replacement or in-place mutation during held inspection without emitting evidence
      ---
      duration_ms: 9.995157
      type: 'test'
      ...
    # Subtest: keeps held A bytes, evidence, and publication stable when original and public pathnames change during inspection
    ok 5 - keeps held A bytes, evidence, and publication stable when original and public pathnames change during inspection
      ---
      duration_ms: 9.574271
      type: 'test'
      ...
    # Subtest: continues to reject a mutable pathname passed directly to DMG inspection
    ok 6 - continues to reject a mutable pathname passed directly to DMG inspection
      ---
      duration_ms: 0.36411
      type: 'test'
      ...
    # Subtest: requires explicit fixture authority for Windows-hosted DMG evidence tests
    ok 7 - requires explicit fixture authority for Windows-hosted DMG evidence tests # SKIP
      ---
      duration_ms: 0.114243
      type: 'test'
      ...
    # Subtest: accepts real Darwin mode-0700 directory and mode-0600 single-link file authority
    ok 8 - accepts real Darwin mode-0700 directory and mode-0600 single-link file authority # SKIP
      ---
      duration_ms: 0.069976
      type: 'test'
      ...
    # Subtest: rejects native Darwin broad mode, foreign owner, extra link, replacement type, and symlink with fixed authority codes
    ok 9 - rejects native Darwin broad mode, foreign owner, extra link, replacement type, and symlink with fixed authority codes # SKIP
      ---
      duration_ms: 0.115054
      type: 'test'
      ...
    # Subtest: accepts native xattr/ctime-only change when held bytes and identity are unchanged
    ok 10 - accepts native xattr/ctime-only change when held bytes and identity are unchanged # SKIP
      ---
      duration_ms: 0.323138
      type: 'test'
      ...
    # Subtest: does not emit claimed DMG layout evidence without the native-validation marker
    ok 11 - does not emit claimed DMG layout evidence without the native-validation marker
      ---
      duration_ms: 9.807363
      type: 'test'
      ...
    # Subtest: strictly rejects missing, mixed, stale, malformed, or fabricated native DMG evidence
    ok 12 - strictly rejects missing, mixed, stale, malformed, or fabricated native DMG evidence
      ---
      duration_ms: 300.976717
      type: 'test'
      ...
    # Subtest: rejects native DMG evidence copied between x64 and arm64 fragments
    ok 13 - rejects native DMG evidence copied between x64 and arm64 fragments
      ---
      duration_ms: 25.763763
      type: 'test'
      ...
    # Subtest: rejects duplicate target fragments before aggregation
    ok 14 - rejects duplicate target fragments before aggregation
      ---
      duration_ms: 26.248931
      type: 'test'
      ...
    # Subtest: rejects either Windows fragment when the installed ordinary-user application gate was skipped
    ok 15 - rejects either Windows fragment when the installed ordinary-user application gate was skipped
      ---
      duration_ms: 62.838236
      type: 'test'
      ...
    # Subtest: fails closed when trusted update signing configuration is incomplete
    ok 16 - fails closed when trusted update signing configuration is incomplete
      ---
      duration_ms: 67.903782
      type: 'test'
      ...
    # Subtest: signs cryptographically bound feeds only in the trusted release phase
    ok 17 - signs cryptographically bound feeds only in the trusted release phase
      ---
      duration_ms: 51.613512
      type: 'test'
      ...
    # Subtest: refuses to sign a renamed extensionless distributable
    ok 18 - refuses to sign a renamed extensionless distributable
      ---
      duration_ms: 39.665677
      type: 'test'
      ...
    # Subtest: refuses to sign when artifact bytes changed after unsigned finalization
    ok 19 - refuses to sign when artifact bytes changed after unsigned finalization
      ---
      duration_ms: 37.157012
      type: 'test'
      ...
    # Subtest: rejects unsigned production metadata and actual signer mismatches
    ok 20 - rejects unsigned production metadata and actual signer mismatches
      ---
      duration_ms: 84.70568
      type: 'test'
      ...
    # Subtest: rejects mixed Windows signers and tampered fingerprint evidence
    ok 21 - rejects mixed Windows signers and tampered fingerprint evidence
      ---
      duration_ms: 48.189571
      type: 'test'
      ...
    # Subtest: parses x64 and arm64 ELF, PE, and Mach-O executable fixtures
    ok 22 - parses x64 and arm64 ELF, PE, and Mach-O executable fixtures
      ---
      duration_ms: 1.352242
      type: 'test'
      ...
    # Subtest: derives Windows target architecture from the full NUPKG independently of its supported bootstrapper
    ok 23 - derives Windows target architecture from the full NUPKG independently of its supported bootstrapper
      ---
      duration_ms: 10.85796
      type: 'test'
      ...
    # Subtest: binds ZIP and NUPKG executables to exact maker-specific canonical paths
    ok 24 - binds ZIP and NUPKG executables to exact maker-specific canonical paths
      ---
      duration_ms: 3.500718
      type: 'test'
      ...
    # Subtest: rejects missing, corrupt, mismatched, and ambiguous packaged Windows authority helpers
    ok 25 - rejects missing, corrupt, mismatched, and ambiguous packaged Windows authority helpers
      ---
      duration_ms: 5.378974
      type: 'test'
      ...
    # Subtest: accepts only the real Forge macOS framework-internal symbolic-link layout
    ok 26 - accepts only the real Forge macOS framework-internal symbolic-link layout
      ---
      duration_ms: 3.980512
      type: 'test'
      ...
    # Subtest: rejects hostile macOS ZIP symbolic links before trusting their payloads
    ok 27 - rejects hostile macOS ZIP symbolic links before trusting their payloads
      ---
      duration_ms: 15.776899
      type: 'test'
      ...
    # Subtest: rejects unsafe, duplicate, shadowed, forged, alternate, and noncanonical archive layouts
    ok 28 - rejects unsafe, duplicate, shadowed, forged, alternate, and noncanonical archive layouts
      ---
      duration_ms: 4.661191
      type: 'test'
      ...
    # Subtest: rejects cross-labeled package architectures at staging and finalization
    ok 29 - rejects cross-labeled package architectures at staging and finalization
      ---
      duration_ms: 31.981114
      type: 'test'
      ...
    1..29
ok 1 - desktop release artifacts
  ---
  duration_ms: 1217.395942
  type: 'suite'
  ...
1..1
# tests 29
# suites 1
# pass 25
# fail 0
# cancelled 0
# skipped 4
# todo 0
# duration_ms 1465.379658

[8/361] apps/desktop/scripts/release-preflight.test.mjs
TAP version 13
# Subtest: desktop release preflight
    # Subtest: accepts only a new immutable tag reachable from protected main and a protected environment
    ok 1 - accepts only a new immutable tag reachable from protected main and a protected environment
      ---
      duration_ms: 3.255988
      type: 'test'
      ...
    # Subtest: accepts an authorization-visible bypass list and fails closed for hidden or denied ruleset details
    ok 2 - accepts an authorization-visible bypass list and fails closed for hidden or denied ruleset details
      ---
      duration_ms: 1.27777
      type: 'test'
      ...
    # Subtest: paginates repository rulesets and reads every full rule definition
    ok 3 - paginates repository rulesets and reads every full rule definition
      ---
      duration_ms: 3.671766
      type: 'test'
      ...
    # Subtest: requires an exact active bypass-free update and deletion tag ruleset
    ok 4 - requires an exact active bypass-free update and deletion tag ruleset
      ---
      duration_ms: 1.794511
      type: 'test'
      ...
    # Subtest: rejects ruleset mutation or deletion during preflight
    ok 5 - rejects ruleset mutation or deletion during preflight
      ---
      duration_ms: 1.174985
      type: 'test'
      ...
    # Subtest: requires the complete effective environment policy set to be exactly desktop-v* tags
    ok 6 - requires the complete effective environment policy set to be exactly desktop-v* tags
      ---
      duration_ms: 3.294546
      type: 'test'
      ...
    # Subtest: requires the separately protected preflight credential environment
    ok 7 - requires the separately protected preflight credential environment
      ---
      duration_ms: 0.830444
      type: 'test'
      ...
    # Subtest: paginates all environment policies and rejects a permissive policy on a later page
    ok 8 - paginates all environment policies and rejects a permissive policy on a later page
      ---
      duration_ms: 0.841081
      type: 'test'
      ...
    # Subtest: rejects missing or ambiguous environment protection and explicit API denial
    ok 9 - rejects missing or ambiguous environment protection and explicit API denial
      ---
      duration_ms: 1.181775
      type: 'test'
      ...
    # Subtest: rejects tags not created by this push, tags off main, and moved or existing releases
    ok 10 - rejects tags not created by this push, tags off main, and moved or existing releases
      ---
      duration_ms: 1.889424
      type: 'test'
      ...
    1..10
ok 1 - desktop release preflight
  ---
  duration_ms: 20.586514
  type: 'suite'
  ...
1..1
# tests 10
# suites 1
# pass 10
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 262.712722

[9/361] apps/desktop/scripts/release-publish.test.mjs
TAP version 13
# Subtest: atomic desktop release publication
    # Subtest: creates a draft, paginates and verifies the exact final assets, then publishes
    ok 1 - creates a draft, paginates and verifies the exact final assets, then publishes
      ---
      duration_ms: 164.29017
      type: 'test'
      ...
    # Subtest: leaves a partial upload as a recoverable draft and resumes only matching assets
    ok 2 - leaves a partial upload as a recoverable draft and resumes only matching assets
      ---
      duration_ms: 12.111393
      type: 'test'
      ...
    # Subtest: rejects unexpected, duplicate, size, and content-digest asset mismatches without publishing
    ok 3 - rejects unexpected, duplicate, size, and content-digest asset mismatches without publishing
      ---
      duration_ms: 8.943128
      type: 'test'
      ...
    # Subtest: rejects tag drift before publishing the verified draft
    ok 4 - rejects tag drift before publishing the verified draft
      ---
      duration_ms: 5.387447
      type: 'test'
      ...
    # Subtest: rejects local files outside or missing from finalized checksums
    ok 5 - rejects local files outside or missing from finalized checksums
      ---
      duration_ms: 3.101629
      type: 'test'
      ...
    1..5
ok 1 - atomic desktop release publication
  ---
  duration_ms: 195.305691
  type: 'suite'
  ...
1..1
# tests 5
# suites 1
# pass 5
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 425.953203

[10/361] apps/desktop/scripts/verify-darwin-image.test.mjs
TAP version 13
# Subtest: Darwin image verification retries only bounded documented resource states
ok 1 - Darwin image verification retries only bounded documented resource states
  ---
  duration_ms: 14.244224
  type: 'test'
  ...
# Subtest: Darwin image verification does not retry malformed/truncated images or accept mutation
ok 2 - Darwin image verification does not retry malformed/truncated images or accept mutation
  ---
  duration_ms: 10.091532
  type: 'test'
  ...
# Subtest: Darwin image verification holds a fixed hdiutil image behind a real mutation and replacement barrier
ok 3 - Darwin image verification holds a fixed hdiutil image behind a real mutation and replacement barrier # SKIP
  ---
  duration_ms: 0.254164
  type: 'test'
  ...
1..3
# tests 3
# suites 0
# pass 2
# fail 0
# cancelled 0
# skipped 1
# todo 0
# duration_ms 254.074486

[11/361] apps/desktop/scripts/windows-fixture-acl.test.mjs
TAP version 13
# Subtest: keeps the encoded Windows PowerShell 5.1 ACL helper fail-closed and byte-empty
ok 1 - keeps the encoded Windows PowerShell 5.1 ACL helper fail-closed and byte-empty # SKIP
  ---
  duration_ms: 0.812047
  type: 'test'
  ...
1..1
# tests 1
# suites 0
# pass 0
# fail 0
# cancelled 0
# skipped 1
# todo 0
# duration_ms 224.137909

[12/361] apps/desktop/scripts/windows-packaged-connect-staging.test.mjs
TAP version 13
# Subtest: capture redirection mismatch reporting is total and redacted for each launch predicate
ok 1 - capture redirection mismatch reporting is total and redacted for each launch predicate
  ---
  duration_ms: 3.771396
  type: 'test'
  ...
# Subtest: positive host Node producer failures expose only fixed allowlisted evidence
ok 2 - positive host Node producer failures expose only fixed allowlisted evidence
  ---
  duration_ms: 1.208385
  type: 'test'
  ...
# Subtest: hostile diagnostics reject uppercase PATH without matching fixed path subphases
ok 3 - hostile diagnostics reject uppercase PATH without matching fixed path subphases
  ---
  duration_ms: 0.168464
  type: 'test'
  ...
# Subtest: packaged Windows Connect staging contract
    # Subtest: accepts only the exact generated leaf below the fixed canonical staging parent
    ok 1 - accepts only the exact generated leaf below the fixed canonical staging parent
      ---
      duration_ms: 1.596151
      type: 'test'
      ...
    # Subtest: accepts one bounded parent-owned handoff and rejects every other input shape
    ok 2 - accepts one bounded parent-owned handoff and rejects every other input shape
      ---
      duration_ms: 0.704404
      type: 'test'
      ...
    # Subtest: emits only fixed staged-contract predicate evidence
    ok 3 - emits only fixed staged-contract predicate evidence
      ---
      duration_ms: 0.909474
      type: 'test'
      ...
    # Subtest: rejects missing, inaccessible, reparse, wrong-type, and noncanonical entries before preflight
    ok 4 - rejects missing, inaccessible, reparse, wrong-type, and noncanonical entries before preflight
      ---
      duration_ms: 2.004608
      type: 'test'
      ...
    # Subtest: proves target PE architecture and ordinary-user access before returning the executable
    ok 5 - proves target PE architecture and ordinary-user access before returning the executable
      ---
      duration_ms: 1.318842
      type: 'test'
      ...
    # Subtest: maps a hostile preflight callback throw totally and redacts all supplied evidence
    ok 6 - maps a hostile preflight callback throw totally and redacts all supplied evidence
      ---
      duration_ms: 1.164459
      type: 'test'
      ...
    # Subtest: keeps PE type and architecture failures distinct
    ok 7 - keeps PE type and architecture failures distinct
      ---
      duration_ms: 0.714589
      type: 'test'
      ...
    # Subtest: maps hostile exceptions to a fixed path-free allowlist
    ok 8 - maps hostile exceptions to a fixed path-free allowlist
      ---
      duration_ms: 0.621149
      type: 'test'
      ...
    # Subtest: classifies fixed phases without collapsing pre-spawn failures into spawn
    ok 9 - classifies fixed phases without collapsing pre-spawn failures into spawn
      ---
      duration_ms: 0.386934
      type: 'test'
      ...
    # Subtest: maps every preflight transport and exit result to fixed subphase evidence
    ok 10 - maps every preflight transport and exit result to fixed subphase evidence
      ---
      duration_ms: 0.877355
      type: 'test'
      ...
    # Subtest: preflight diagnostics exclude path, SID, account name, stdout, and stderr evidence
    ok 11 - preflight diagnostics exclude path, SID, account name, stdout, and stderr evidence
      ---
      duration_ms: 0.49625
      type: 'test'
      ...
    # Subtest: scopes staged-root and executable leak needles to Windows
    ok 12 - scopes staged-root and executable leak needles to Windows
      ---
      duration_ms: 0.287945
      type: 'test'
      ...
    1..12
ok 4 - packaged Windows Connect staging contract
  ---
  duration_ms: 12.232857
  type: 'suite'
  ...
# Subtest: the workflow stages before alternate credentials and the harness preflights before application spawn
ok 5 - the workflow stages before alternate credentials and the harness preflights before application spawn
  ---
  duration_ms: 24.167888
  type: 'test'
  ...
# Subtest: the PS5.1 child-failure parser accepts only the two exact bounded producer schemas
ok 6 - the PS5.1 child-failure parser accepts only the two exact bounded producer schemas # SKIP
  ---
  duration_ms: 0.121413
  type: 'test'
  ...
# Subtest: the PS5.1 capture parser enforces native owner ACL path and identity authority
ok 7 - the PS5.1 capture parser enforces native owner ACL path and identity authority # SKIP
  ---
  duration_ms: 0.058408
  type: 'test'
  ...
# Subtest: nominal reaches zero with exact protected stdout and stderr capture
ok 8 - nominal reaches zero with exact protected stdout and stderr capture # SKIP
  ---
  duration_ms: 0.037466
  type: 'test'
  ...
# Subtest: a forced nonzero capture producer maps only to redirect-child-exit
ok 9 - a forced nonzero capture producer maps only to redirect-child-exit # SKIP
  ---
  duration_ms: 0.034092
  type: 'test'
  ...
# Subtest: empty and hostile producer results map only to fixed bounded buckets
ok 10 - empty and hostile producer results map only to fixed bounded buckets # SKIP
  ---
  duration_ms: 0.110527
  type: 'test'
  ...
# Subtest: each host preflight failure transition emits one fixed redacted subphase
ok 11 - each host preflight failure transition emits one fixed redacted subphase # SKIP
  ---
  duration_ms: 0.07282
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer rejects zero command evidence
ok 12 - the PS5.1 host Node producer rejects zero command evidence # SKIP
  ---
  duration_ms: 0.036375
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer rejects duplicate command evidence
ok 13 - the PS5.1 host Node producer rejects duplicate command evidence # SKIP
  ---
  duration_ms: 0.029484
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer rejects multiple command evidence
ok 14 - the PS5.1 host Node producer rejects multiple command evidence # SKIP
  ---
  duration_ms: 0.030055
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer rejects mixed-types command evidence
ok 15 - the PS5.1 host Node producer rejects mixed-types command evidence # SKIP
  ---
  duration_ms: 0.030456
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer rejects case-collision command evidence
ok 16 - the PS5.1 host Node producer rejects case-collision command evidence # SKIP
  ---
  duration_ms: 0.029505
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer rejects non-application command evidence
ok 17 - the PS5.1 host Node producer rejects non-application command evidence # SKIP
  ---
  duration_ms: 0.029245
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer rejects missing-source command evidence
ok 18 - the PS5.1 host Node producer rejects missing-source command evidence # SKIP
  ---
  duration_ms: 0.028663
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer rejects non-scalar-source command evidence
ok 19 - the PS5.1 host Node producer rejects non-scalar-source command evidence # SKIP
  ---
  duration_ms: 0.029314
  type: 'test'
  ...
# Subtest: the PS5.1 host Node producer returns one validated scalar Source
ok 20 - the PS5.1 host Node producer returns one validated scalar Source # SKIP
  ---
  duration_ms: 0.097267
  type: 'test'
  ...
# Subtest: the host launcher accepts only a stable final ordinary-file identity
ok 21 - the host launcher accepts only a stable final ordinary-file identity # SKIP
  ---
  duration_ms: 0.072099
  type: 'test'
  ...
# Subtest: the bounded cleanup source requires proven child exit and bounded stream closure
ok 22 - the bounded cleanup source requires proven child exit and bounded stream closure
  ---
  duration_ms: 8.623485
  type: 'test'
  ...
# Subtest: the native timeout path terminates an actual child and descendant tree
ok 23 - the native timeout path terminates an actual child and descendant tree # SKIP
  ---
  duration_ms: 0.158139
  type: 'test'
  ...
# Subtest: a real never-settling cleanup is bounded, terminated, and remains secondary
ok 24 - a real never-settling cleanup is bounded, terminated, and remains secondary # SKIP
  ---
  duration_ms: 0.067752
  type: 'test'
  ...
1..24
# tests 35
# suites 1
# pass 17
# fail 0
# cancelled 0
# skipped 18
# todo 0
# duration_ms 297.332182

[13/361] apps/desktop/src/connect-discovery.test.ts
TAP version 13
# Subtest: desktop fixed-root Connect discovery
    # Subtest: projects only a stable opaque profile and canonical endpoint
    ok 1 - projects only a stable opaque profile and canonical endpoint
      ---
      duration_ms: 2.222156
      type: 'test'
      ...
    # Subtest: fences rediscovery to an existing managed profile and preserves its id and label
    ok 2 - fences rediscovery to an existing managed profile and preserves its id and label
      ---
      duration_ms: 1.115425
      type: 'test'
      ...
    # Subtest: discards rediscovery when the exact saved profile changes while native discovery awaits
    ok 3 - discards rediscovery when the exact saved profile changes while native discovery awaits
      ---
      duration_ms: 0.677283
      type: 'test'
      ...
    # Subtest: fails closed for unsupported hosts and malformed native results
    ok 4 - fails closed for unsupported hosts and malformed native results
      ---
      duration_ms: 0.632675
      type: 'test'
      ...
    # Subtest: generation-conditionally clears failed intents while keeping prior activations fenced
    ok 5 - generation-conditionally clears failed intents while keeping prior activations fenced
      ---
      duration_ms: 0.770444
      type: 'test'
      ...
    # Subtest: scopes discovery freshness per profile and only discards stale same-profile completions
    ok 6 - scopes discovery freshness per profile and only discards stale same-profile completions
      ---
      duration_ms: 0.492884
      type: 'test'
      ...
    1..6
ok 1 - desktop fixed-root Connect discovery
  ---
  duration_ms: 7.880803
  type: 'suite'
  ...
1..1
# tests 6
# suites 1
# pass 6
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 325.815638

[14/361] apps/desktop/src/credential-service.pairing-browser.test.ts
TAP version 13
# Subtest: DesktopCredentialService pairing browser sink
    # Subtest: binds the API base, pairing id, and response URL through the final shell validator
    ok 1 - binds the API base, pairing id, and response URL through the final shell validator
      ---
      duration_ms: 70.272846
      type: 'test'
      ...
    # Subtest: rejects a URL replaced after the credential service receives the API response
    ok 2 - rejects a URL replaced after the credential service receives the API response
      ---
      duration_ms: 15.568615
      type: 'test'
      ...
    1..2
ok 1 - DesktopCredentialService pairing browser sink
  ---
  duration_ms: 86.811465
  type: 'suite'
  ...
1..1
# tests 2
# suites 1
# pass 2
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 513.104546

[15/361] apps/desktop/src/credential-service.test.ts
TAP version 13
# Subtest: main-process desktop credential service
    # Subtest: fails a relaunched same-origin replacement closed before sending the stored bearer
    ok 1 - fails a relaunched same-origin replacement closed before sending the stored bearer
      ---
      duration_ms: 92.298158
      type: 'test'
      ...
    # Subtest: durably rejects malformed relaunch discovery without sending the stored bearer
    ok 2 - durably rejects malformed relaunch discovery without sending the stored bearer
      ---
      duration_ms: 36.618438
      type: 'test'
      ...
    # Subtest: revalidates an old Socket.IO reconnect and sends zero bearer requests after identity rotation
    ok 3 - revalidates an old Socket.IO reconnect and sends zero bearer requests after identity rotation
      ---
      duration_ms: 50.500757
      type: 'test'
      ...
    # Subtest: fences old and concurrently rotated Connect claims through pairing, commit, and transport activation
    ok 4 - fences old and concurrently rotated Connect claims through pairing, commit, and transport activation
      ---
      duration_ms: 201.431944
      type: 'test'
      ...
    # Subtest: injects the active bearer only for its bound profile origin and strips renderer identity
    ok 5 - injects the active bearer only for its bound profile origin and strips renderer identity
      ---
      duration_ms: 46.427393
      type: 'test'
      ...
    # Subtest: uses only the active bearer when profiles share an origin and never a cookie identity
    ok 6 - uses only the active bearer when profiles share an origin and never a cookie identity
      ---
      duration_ms: 58.416081
      type: 'test'
      ...
    # Subtest: detaches profile B credential A without sending any bearer request to A or minting a ticket
    ok 7 - detaches profile B credential A without sending any bearer request to A or minting a ticket
      ---
      duration_ms: 36.409833
      type: 'test'
      ...
    # Subtest: does not mint a ticket when a delayed B probe observes credential replacement with origin A
    ok 8 - does not mint a ticket when a delayed B probe observes credential replacement with origin A
      ---
      duration_ms: 39.39315
      type: 'test'
      ...
    # Subtest: atomically rejects a ticket when delayed activation races with profile B credential A
    ok 9 - atomically rejects a ticket when delayed activation races with profile B credential A
      ---
      duration_ms: 38.623642
      type: 'test'
      ...
    # Subtest: keeps a slow successful same-origin A probe status-only after fast B activates
    ok 10 - keeps a slow successful same-origin A probe status-only after fast B activates
      ---
      duration_ms: 58.941921
      type: 'test'
      ...
    # Subtest: keeps A active while B is only probed and if B selection persistence fails
    ok 11 - keeps A active while B is only probed and if B selection persistence fails
      ---
      duration_ms: 65.100027
      type: 'test'
      ...
    # Subtest: keeps B active during a direct same-origin A probe and rejects replayed activation tickets
    ok 12 - keeps B active during a direct same-origin A probe and rejects replayed activation tickets
      ---
      duration_ms: 65.288471
      type: 'test'
      ...
    # Subtest: rejects activation after candidate removal, selection drift, or exact credential replacement
    ok 13 - rejects activation after candidate removal, selection drift, or exact credential replacement
      ---
      duration_ms: 205.877787
      type: 'test'
      ...
    # Subtest: binds REST and Socket.IO work to one fresh scope and rejects stale or malformed markers
    ok 14 - binds REST and Socket.IO work to one fresh scope and rejects stale or malformed markers
      ---
      duration_ms: 68.201301
      type: 'test'
      ...
    # Subtest: passes through a realistic packaged-origin CORS preflight without renderer identity or bearer injection
    ok 15 - passes through a realistic packaged-origin CORS preflight without renderer identity or bearer injection
      ---
      duration_ms: 0.399032
      type: 'test'
      ...
    # Subtest: rotates scope on every same-profile reprobe and rejects a cold reconnect from the old activation
    ok 16 - rotates scope on every same-profile reprobe and rejects a cold reconnect from the old activation
      ---
      duration_ms: 50.190883
      type: 'test'
      ...
    # Subtest: never sends an A-origin bearer after the profile URL is edited to an attacker origin
    ok 17 - never sends an A-origin bearer after the profile URL is edited to an attacker origin
      ---
      duration_ms: 19.950243
      type: 'test'
      ...
    # Subtest: preserves a re-paired credential and current connection after a stale definitive probe response
    ok 18 - preserves a re-paired credential and current connection after a stale definitive probe response
      ---
      duration_ms: 74.017515
      type: 'test'
      ...
    # Subtest: preserves a replacement credential at a changed origin after a stale definitive probe response
    ok 19 - preserves a replacement credential at a changed origin after a stale definitive probe response
      ---
      duration_ms: 68.590418
      type: 'test'
      ...
    # Subtest: preserves the active profile and credential when an origin edit fails during browser-launch
    ok 20 - preserves the active profile and credential when an origin edit fails during browser-launch
      ---
      duration_ms: 45.809205
      type: 'test'
      ...
    # Subtest: preserves the active profile and credential when an origin edit fails during cancellation
    ok 21 - preserves the active profile and credential when an origin edit fails during cancellation
      ---
      duration_ms: 45.889902
      type: 'test'
      ...
    # Subtest: preserves the active profile and credential when an origin edit fails during expiry
    ok 22 - preserves the active profile and credential when an origin edit fails during expiry
      ---
      duration_ms: 44.06131
      type: 'test'
      ...
    # Subtest: preserves the active profile and credential when an origin edit fails during polling
    ok 23 - preserves the active profile and credential when an origin edit fails during polling
      ---
      duration_ms: 49.896684
      type: 'test'
      ...
    # Subtest: preserves the active profile and credential when an origin edit fails during secure-storage
    ok 24 - preserves the active profile and credential when an origin edit fails during secure-storage
      ---
      duration_ms: 59.555021
      type: 'test'
      ...
    # Subtest: commits an edited profile and replacement credential before revoking the old token
    ok 25 - commits an edited profile and replacement credential before revoking the old token
      ---
      duration_ms: 63.681159
      type: 'test'
      ...
# NATIVE_SCENARIO delivery
    # Subtest: durably journals a provisional delivery before server activation and local publication
    ok 26 - durably journals a provisional delivery before server activation and local publication
      ---
      duration_ms: 29.548165
      type: 'test'
      ...
    # Subtest: retries an encrypted pending A revocation across failure, restart, remote success, and local cleanup failure
    ok 27 - retries an encrypted pending A revocation across failure, restart, remote success, and local cleanup failure
      ---
      duration_ms: 149.966529
      type: 'test'
      ...
# NATIVE_SCENARIO revocation-crash
    # Subtest: recovers B and retries idempotently after a real process crash during-revoke
    ok 28 - recovers B and retries idempotently after a real process crash during-revoke
      ---
      duration_ms: 412.063439
      type: 'test'
      ...
# NATIVE_SCENARIO revocation-crash
    # Subtest: recovers B and retries idempotently after a real process crash after-remote-success
    ok 29 - recovers B and retries idempotently after a real process crash after-remote-success
      ---
      duration_ms: 406.516591
      type: 'test'
      ...
    # Subtest: cleans durable retry material only for endpoint-bound terminal 204 success
    ok 30 - cleans durable retry material only for endpoint-bound terminal 204 success
      ---
      duration_ms: 32.429442
      type: 'test'
      ...
    # Subtest: cleans durable retry material only for endpoint-bound terminal 404 TOKEN_NOT_FOUND
    ok 31 - cleans durable retry material only for endpoint-bound terminal 404 TOKEN_NOT_FOUND
      ---
      duration_ms: 47.59032
      type: 'test'
      ...
    # Subtest: cleans durable retry material only for endpoint-bound terminal 401 INSTANCE_TOKEN_REVOKED
    ok 32 - cleans durable retry material only for endpoint-bound terminal 401 INSTANCE_TOKEN_REVOKED
      ---
      duration_ms: 29.950527
      type: 'test'
      ...
    # Subtest: cleans durable retry material only for endpoint-bound terminal 401 INSTANCE_TOKEN_EXPIRED
    ok 33 - cleans durable retry material only for endpoint-bound terminal 401 INSTANCE_TOKEN_EXPIRED
      ---
      duration_ms: 31.368779
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for empty 401
    ok 34 - retains encrypted retry material for empty 401
      ---
      duration_ms: 29.943577
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for empty 404
    ok 35 - retains encrypted retry material for empty 404
      ---
      duration_ms: 24.855572
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for HTML route 404
    ok 36 - retains encrypted retry material for HTML route 404
      ---
      duration_ms: 26.83353
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for malformed JSON
    ok 37 - retains encrypted retry material for malformed JSON
      ---
      duration_ms: 25.425503
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for wrong content type
    ok 38 - retains encrypted retry material for wrong content type
      ---
      duration_ms: 30.294626
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for wrong schema version
    ok 39 - retains encrypted retry material for wrong schema version
      ---
      duration_ms: 25.319422
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for wrong credential generation
    ok 40 - retains encrypted retry material for wrong credential generation
      ---
      duration_ms: 25.061523
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for unknown terminal code
    ok 41 - retains encrypted retry material for unknown terminal code
      ---
      duration_ms: 26.441648
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for status/code mismatch
    ok 42 - retains encrypted retry material for status/code mismatch
      ---
      duration_ms: 31.440277
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for redirect
    ok 43 - retains encrypted retry material for redirect
      ---
      duration_ms: 24.491602
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for redirected 204
    ok 44 - retains encrypted retry material for redirected 204
      ---
      duration_ms: 25.054141
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for wrong endpoint 204
    ok 45 - retains encrypted retry material for wrong endpoint 204
      ---
      duration_ms: 27.730884
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for server failure
    ok 46 - retains encrypted retry material for server failure
      ---
      duration_ms: 23.011546
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for oversized JSON
    ok 47 - retains encrypted retry material for oversized JSON
      ---
      duration_ms: 23.191819
      type: 'test'
      ...
    # Subtest: accepts encrypted retry material for chunked 2048-byte terminal JSON
    ok 48 - accepts encrypted retry material for chunked 2048-byte terminal JSON
      ---
      duration_ms: 29.483802
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for chunked 2049-byte terminal JSON
    ok 49 - retains encrypted retry material for chunked 2049-byte terminal JSON
      ---
      duration_ms: 31.074034
      type: 'test'
      ...
    # Subtest: accepts encrypted retry material for terminal JSON without Content-Length
    ok 50 - accepts encrypted retry material for terminal JSON without Content-Length
      ---
      duration_ms: 29.717345
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for deceptive short Content-Length
    ok 51 - retains encrypted retry material for deceptive short Content-Length
      ---
      duration_ms: 25.027992
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for extra chunk after declared Content-Length
    ok 52 - retains encrypted retry material for extra chunk after declared Content-Length
      ---
      duration_ms: 25.585254
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for malformed UTF-8
    ok 53 - retains encrypted retry material for malformed UTF-8
      ---
      duration_ms: 29.81277
      type: 'test'
      ...
    # Subtest: retains encrypted retry material for premature body error
    ok 54 - retains encrypted retry material for premature body error
      ---
      duration_ms: 22.468076
      type: 'test'
      ...
    # Subtest: bounds a one-byte slowloris body and retains its encrypted retry material
    ok 55 - bounds a one-byte slowloris body and retains its encrypted retry material
      ---
      duration_ms: 49.786773
      type: 'test'
      ...
    # Subtest: dispose aborts a stalled header fetch, deduplicates its generation, and leaves no later activity
    ok 56 - dispose aborts a stalled header fetch, deduplicates its generation, and leaves no later activity
      ---
      duration_ms: 44.343125
      type: 'test'
      ...
    # Subtest: dispose cancels a headers-then-stall body and retains exact encrypted material
    not ok 57 - dispose cancels a headers-then-stall body and retains exact encrypted material
      ---
      duration_ms: 50.841711
      type: 'test'
      location: '/home/runner/work/propr/propr/apps/desktop/src/credential-service.test.ts:1:76352'
      failureType: 'testCodeFailure'
      error: |-
        Expected values to be strictly equal:
        
        false !== true
        
      code: 'ERR_ASSERTION'
      name: 'AssertionError'
      expected: true
      actual: false
      operator: 'strictEqual'
      stack: |-
        TestContext.<anonymous> (/home/runner/work/propr/propr/apps/desktop/src/credential-service.test.ts:1882:12)
        async Test.run (node:internal/test_runner/test:1054:7)
        async Suite.processPendingSubtests (node:internal/test_runner/test:744:7)
      ...
# NATIVE_SCENARIO dispose
    # Subtest: dispose waits for terminal journal cleanup and no file operation ru

...(truncated)

View Workflow

@integry integry added the AI label Sep 2, 2026
@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/review

Final Mac/Linux/shared review of exact head 1e87f07, goal >=9. Re-evaluate F1–F10. In particular confirm F9 detaches any readable persisted identity mismatch generation-conditionally before incompatible/capability exits with zero bearer and correct old-token cleanup, and F10 owns/cancels late header Responses after timeout/caller abort without canceling an accepted Response. Confirm the native headers-then-stall fixture now waits for reader body ownership (pull, not construction), exact 72/119 passes, F4–F8 remain closed, all four packaged fixtures remain first→AAA/second→BBB, and no workflow/lock/release/Windows drift. Ignore Windows-only lanes. Do not merge.

@propr-dev

propr-dev Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@integry integry removed the AI label Sep 2, 2026
@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR substantially strengthens desktop credential identity binding, strict discovery parsing, Connect rotation fencing, and bearer isolation. It needs one localized cancellation fix before merge; current-head checks show no failures, though 19 checks remain pending.

✅ Identity mismatch cleanup is correctly ordered — probe() performs credential-free discovery, generation-conditionally detaches a readable mismatched credential before compatibility or capability exits, and does not send its bearer. Revocation also rechecks identity before old-token transmission.

✅ Connect races are well fenced — Pending intents are published synchronously per profile, stale snapshots become non-committable, publication is serialized with pairing commits, and failed intents retain the prior claim without re-enabling pre-intent activations.

✅ Scoped regressions are covered — The durability gate requires exactly 72 credential-service tests and 119 total; the stalled-body fixture signals ownership from pull(); and packaged fixtures consistently map first→AAA and second→BBB. No workflow, lockfile, release-profile, or Windows-specific drift appears in the diff.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F11: 🔴 Pre-aborted discovery can succeed

  • Required behavior: The new discovery deadline must preserve caller-abort classification and reject/cancel responses from fetch implementations that ignore AbortSignal.
  • Evidence: packages/client/src/client.ts:111 — onAbort() can reject deadline before race() begins, but race() registers the already-fulfilled operation handler before deadline.catch() at line 118. Because the fetch expression is also evaluated before entering race(), a pre-aborted caller—or a fetch implementation that synchronously aborts the caller and returns an immediately fulfilled Response—can have the response handler win microtask ordering. A buffered valid response can consequently return success instead of aborted, and its body is not disposed as a late response.
  • Minimum fix: Short-circuit an already-aborted caller before invoking fetch, and make deadline settlement authoritative when race() is entered by registering/checking it before accepting the operation. Dispose a response whenever cancellation already won, while retaining the current behavior of not canceling a normally accepted response. Add a regression using an ignored-signal fetch that immediately returns a response after caller cancellation.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The identity-binding and generation-fencing work is otherwise comprehensive, but the remaining F10 cancellation race violates an explicit changed contract. The pending checks should also complete before merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 2m 35s
  • Tokens: 78,797 (70,471 in / 8,326 out)
  • Cost: $0.60

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@integry integry added the AI label Sep 2, 2026
@integry

integry commented Sep 2, 2026

Copy link
Copy Markdown
Owner

/review

Final exact-head review of 0213483, Mac/Linux/shared only, goal >=9. Verify F11: pre-aborted callers short-circuit before fetch; synchronous in-fetch caller abort and already-settled deadlines are authoritative; both immediate and deferred ignored-signal Responses are canceled as late values; accepted Responses are not canceled; timeout vs caller-abort remains exact with no unhandled rejection. Reconfirm F1–F10, F9 early identity detach with zero bearer, exact 72/119 native durability, four first→AAA/second→BBB packaged lanes, and no workflow/lock/release/Windows drift. Ignore Windows-only lanes. Do not merge.

@propr-dev

propr-dev Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@integry integry removed the AI label Sep 2, 2026
@propr-dev

propr-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

The PR is ready to merge within the requested Mac/Linux/shared scope, conditional on both pending Project Options checks succeeding. No workflow, lockfile, release-profile, or Windows-specific drift is present in the supplied diff; Windows-only lanes were not assessed, and no merge was performed.

✅ Authoritative deadline handling — Pre-aborted callers bypass fetch, synchronous aborts remain authoritative, late ignored-signal responses are canceled, accepted responses are not canceled, and timeout-versus-caller-abort classification follows the first settled deadline without unhandled rejections.

✅ Identity fencing is complete — Strict unauthenticated discovery precedes bearer use, identity mismatches detach credentials before compatibility or capability exits, and generation-bound Connect claims fence stale REST, Socket.IO, pairing, and publication paths.

✅ Release evidence is internally consistent — Native durability is exactly 72 + 37 + 10 = 119, while packaged fixtures consistently map first to AAA and second to BBB across the four-mode setup.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The implementation resolves the reviewed F1–F11 concerns with strong adversarial coverage and no verified scoped regression. The two authoritative checks are still pending, so final merge readiness remains conditional on their successful completion.

Score: 9/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 3m 20s
  • Tokens: 81,497 (70,698 in / 10,799 out)
  • Cost: $0.68

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@integry
integry merged commit 8bcd46b into 1953-epic-desktop-transport-api Sep 3, 2026
37 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant