orca icon indicating copy to clipboard operation
orca copied to clipboard

build(ssh): assemble relay runtime artifacts

Open Jinwoo-H opened this issue 4 months ago • 54 comments

Scope

Work Package 2 for #8450: target-native relay runtime assembly and artifact verification only.

  • pins and authenticates the official Node 24.18.0 inputs and release key
  • builds patched node-pty against the bundled Node headers
  • assembles a runtime-only relay/PTY/watcher tree with deterministic identity and tar.xz
  • emits unpublished SBOM, provenance, and identity evidence
  • adds a read-only four-runner POSIX artifact workflow

Safety boundary

This PR does not connect a desktop resolver, cache, SSH transfer/install path, fallback state machine, target setting, or production launch path. It publishes no GitHub Release and enables no tuple. Existing relay behavior remains the default.

The eventual bundled path remains a per-SSH-target Beta opt-in, default off; any default-on change requires separate review and completed evidence gates.

Local evidence

  • 4 focused suites, 15/15 tests
  • pnpm run typecheck
  • pnpm run lint
  • focused format/max-lines/diff gates
  • fresh native Linux/arm64 build in the pinned container
  • full 49-entry archive/tree verification before bundled Node/native smoke
  • PTY input/resize/exit and watcher create/update/rename/delete

Exact commands, hashes, timings, resource observations, and residual gaps are in the living implementation checklist.

Open gates

GitHub native POSIX runner results, oldest-baseline checks, macOS native trust/signing, Windows runtime/zip, SSH transfer, relay RPC conformance, cancellation/resource metrics, and all tuple-enablement/default-path gates remain open.

Made with Orca 🐋

Jinwoo-H avatar Jul 14 '26 13:07 Jinwoo-H

[!CAUTION]

Review failed

An error occurred during the review process. Please try again later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot] avatar Jul 14 '26 14:07 coderabbitai[bot]

Milestone 4 downloaded-archive execution is closed at exact head 3779838f66a57e3688367256510e096d17d78011.

  • All six target-native build jobs passed the 10-test path/identity/cancellation/cleanup contract and executed their real first-build archive through exclusive extraction, complete tree verification, bundled Node, PTY, and watcher smoke.
  • PR Checks 29438280473 and Golden E2E 29438284781 are green.
  • Artifact run 29438285824 is red only at the retained Windows arm64 floor gate: runtime smoke passed, then hosted build 26200 failed the required build-26100 qualification.
  • No release write, publication, desktop/SSH consumer, tuple enablement, or default-path change is connected.

Exact runner/archive/smoke/RSS evidence is checkpointed locally in E-M4-READBACK-ARCHIVE-EXECUTION-CI-001; the next safe slice is disconnected draft-release failure composition.

Jinwoo-H avatar Jul 15 '26 18:07 Jinwoo-H

Milestone 4 disconnected draft-release failure composition is closed at exact head 8c925c24990ac93f6d2dd8de2081a50a74f30d97.

  • The 10-test bounded identity/order/timeout/retry/partial-output/cancellation/ownership-cleanup contract passed on all six target-native Node 24 jobs.
  • Every job also rebuilt, compared, reconstructed, and executed its real target-native archive.
  • PR Checks 29440804969 and Golden E2E 29440804978 are green.
  • Artifact run 29440806947 is red only at the retained Windows arm64 build-26100 floor gate after successful runtime smoke on hosted build 26200.
  • No real release write, publication, desktop/SSH consumer, tuple enablement, or default-path change is connected.

A real draft release write is not PR-contained and remains no-write by default. The next independent safe package is Milestone 5 offline tuple/content/immutable-URL selection.

Jinwoo-H avatar Jul 15 '26 18:07 Jinwoo-H

Milestone 5 offline selector checkpoint is closed at exact implementation head 3be4e68679f6f235165c8784eca61576dc2fd828 (E-M5-OFFLINE-SELECTION-CI-001).

  • Verified manifests are branded and recursively immutable; selection returns exact authenticated tuple/content/archive/tag-qualified URL with no API/latest lookup.
  • Post-push audit caught that native jobs omitted the source suites; d1dda17c8 wires schema/signature/release/selector/identity tests into both POSIX and Windows job families.
  • All six primary jobs pass full runtime construction plus 377 tests on each POSIX job and 371 passed + 10 platform skips on each Windows job: https://github.com/stablyai/orca/actions/runs/29443291349
  • PR Checks green: https://github.com/stablyai/orca/actions/runs/29443290994
  • Golden E2E green: https://github.com/stablyai/orca/actions/runs/29443291091
  • Artifact aggregate is red only at the retained Windows arm64 floor: the 85,213,511-byte runtime passed Node/PTY/watcher/full-tree smoke in 5,982.393ms at 48,451,584-byte RSS, then hosted build 26200 was rejected against required 26100.

No production key, network/cache consumer, SSH transfer/install, tuple enablement, publication, or default behavior is connected. Legacy remains the only production path. Next package is a disconnected bounded Electron download contract.

Jinwoo-H avatar Jul 15 '26 19:07 Jinwoo-H

Milestone 5 bounded Electron downloader is closed under E-M5-ARTIFACT-DOWNLOAD-CI-001.

Exact implementation/evidence head: fc6b6d2197fa8cc012317a5ea155e57886183c61

  • Artifact run: https://github.com/stablyai/orca/actions/runs/29445770009
  • All six primary Node 24 jobs pass the downloader-containing contract suite and full runtime build/smoke/equality: Linux x64/arm64, macOS x64/arm64, Windows x64/arm64.
  • PR Checks: https://github.com/stablyai/orca/actions/runs/29445769922 — green.
  • Golden E2E: https://github.com/stablyai/orca/actions/runs/29445769934 — Linux and macOS green.
  • Artifact workflow is red only at the retained Windows arm64 oldest-floor gate: runtime verification/smoke passes in 5,781.9983 ms with 47,329,280-byte RSS; hosted build 26200 is then rejected against required build 26100.

This package remains disconnected: no packaged manifest key/loader, live download caller, cache/extraction, SSH transfer/install, mode, tuple enablement, release write, or default behavior. Legacy SSH remains the only production path. Evidence checkpoint is pushed at d345cbfc7; next is an isolated desktop extraction/cache contract audit and RED.

Jinwoo-H avatar Jul 15 '26 20:07 Jinwoo-H

Portable relay archive prerequisite is closed under E-M5-PORTABLE-ARCHIVE-CI-001 at exact implementation/evidence head 3080eda77fd6a11ed87f536c1963e5b67abe7621 (ledger checkpoint a93e67413).

  • All six target-native Node 24 jobs pass deterministic build, strict .tar.br/ZIP inspection and extraction, bundled Node/PTY/watcher smoke, exact archive equality, read-back execution, and upload: https://github.com/stablyai/orca/actions/runs/29449869519
  • Both Linux oldest-userland supplements pass the corrected fresh nested staging path plus glibc 2.28/libstdc++ 6.0.25 execution.
  • PR Checks are green: https://github.com/stablyai/orca/actions/runs/29449869451
  • Golden E2E Linux/macOS are green: https://github.com/stablyai/orca/actions/runs/29449869407
  • Windows x64 floor passes. Windows arm64 reconstructs and smokes in 7,884.492ms with 49,733,632-byte RSS, then fails only the retained hosted build-26200 versus required-build-26100 gate.
  • Exact archive IDs, sizes, SHA-256 values, runner images, test counts, and smoke metrics are in the ledger.

No artifact is published and no desktop cache consumer, SSH transfer/install, mode, tuple, Beta option, or default behavior is connected. Legacy SSH remains the only production path. The next slice is a disconnected desktop extraction/cache contract audit and purpose-named RED.

Jinwoo-H avatar Jul 15 '26 21:07 Jinwoo-H

M5 desktop extraction checkpoint: implementation 7580600e3 and evidence head 39793be9e are pushed. Local proof includes 17 focused tests, 81 artifact tests, 249 relay tests, 279 release tests, full typecheck/lint, and an exact downloaded 122,027,869-byte Darwin arm64 tree at 878.73 ms / 49,283,072-byte incremental RSS. Both native job families now run synthetic TAR.br + ZIP contracts and a post-build full-size measurement before upload. Exact-head run: https://github.com/stablyai/orca/actions/runs/29453466203. Production/default SSH remains legacy-only; no cache publication, transfer/install, tuple, Beta option, release write, or artifact publication is connected.

Jinwoo-H avatar Jul 15 '26 21:07 Jinwoo-H

Native extraction gate update: run 29453466203 produced the required fail-closed RED. Darwin arm64 measured 71,368,704 bytes and Linux x64 68,505,600 bytes against the pre-implementation 64 MiB assumption; both skipped upload, while the other four native full-size cells passed. The correction is 2d5785ef6: strict bounded USTAR inspection plus reusable archive/tree hash buffers. Evidence decision E-M5-ARTIFACT-EXTRACTION-BUDGET-CORRECTION-001 sets cold desktop extraction to 80 MiB (remote stays 32 MiB; single buffers stay <=1 MiB). Replacement exact-head run: https://github.com/stablyai/orca/actions/runs/29455294208. Production/default SSH remains legacy-only.

Jinwoo-H avatar Jul 15 '26 22:07 Jinwoo-H

M5 / WP4 checkpoint (ef76f38d4): disconnected exclusive extraction and complete-tree verification are now CI-closed under E-M5-ARTIFACT-EXTRACTION-CI-001.

  • Exact-head runtime run: https://github.com/stablyai/orca/actions/runs/29455294208
  • All six native Node 24 primary jobs passed hostile/synthetic contracts and exact full-size extraction before unpublished upload.
  • Full-size incremental RSS: 33,517,568–45,989,888 bytes; extraction/tree time: 1,294.77–5,757.55 ms (80 MiB / 2 min gates).
  • Both Linux oldest-userland supplements and Windows x64 build-20348 floor passed.
  • Windows arm64 reconstructed, verified, and executed Node/PTTY/watcher/full-tree smoke, then correctly failed closed because hosted build 26200 does not prove required exact floor 26100.
  • PR Checks 29455294230 and Golden E2E 29455294207 passed at source SHA 39ae077f9b1cf59dc260f45d32d4bd24f3c97c94.

Next gated package: audit cache ownership/locking/atomic publication/quarantine/in-use eviction, then add a purpose-named RED before implementation. Production/default SSH remains legacy-only. No cache consumer, SSH transfer/install, Beta mode, tuple, release publication, or default switch is connected. Merge to main remains prohibited.

Jinwoo-H avatar Jul 15 '26 22:07 Jinwoo-H

Checkpoint: exact correction head 44ef150da39b3977f4a462dbf52f55c5988b6bf7 now passes the purpose-named cache-lock/extraction contract step on all six native Node 24 clients in run https://github.com/stablyai/orca/actions/runs/29459424864, including Windows x64 job 87499607584 and Windows arm64 job 87499607605. Full artifact jobs, PR Checks, and Golden E2E are still running, so cache publication remains gated and no consumer/default path is connected.

Jinwoo-H avatar Jul 15 '26 23:07 Jinwoo-H

Gate closed at exact code head 44ef150da39b3977f4a462dbf52f55c5988b6bf7: E-M5-ARTIFACT-CACHE-LOCK-CI-001 records all six primary native jobs, both Linux supplements, PR Checks, and Golden E2E green. The artifact workflow's only failure is the retained Windows arm64 build-26200 versus required-26100 floor rejection after runtime/tree smoke; no tuple is enabled. Evidence is pushed in 5e742e4df. Active package is now disconnected immutable cache-entry publication/lookup/quarantine only; eviction, consumers, SSH, Beta wiring, and defaults remain gated.

Jinwoo-H avatar Jul 16 '26 00:07 Jinwoo-H

Checkpoint 0ae3e005f: closed immutable relay cache-entry evidence under E-M5-ARTIFACT-CACHE-ENTRY-CI-001. Exact source 3c1ead8fb1e1f3b64abaf78705abb0c801a1d64b passed all 17 entry contracts plus full-size cold/warm cache measurement on all six native Node 24 jobs. Cold: 1.17–6.17s / 34.5–48.8 MiB incremental RSS; warm verified lookup: 0.12–0.70s / 0–6.9 MiB. PR Checks and Golden E2E passed. Windows arm64 retains only the declared hosted build-26200 vs required-26100 floor gap. Next gate: disconnected in-use lease/recency/2 GiB eviction; legacy SSH remains the default and no tuple or consumer is enabled.

Jinwoo-H avatar Jul 16 '26 01:07 Jinwoo-H

Checkpoint: disconnected WP4 cache gate closed at source commit b79bcbd04 (evidence commit 207286053). Artifact run 29464742446 passed all six primary native jobs and full-size active-retention/release/eviction: retention 11.14–47.88 ms with 0–1.99 MiB incremental RSS; eviction 19.02–92.90 ms with 0–2.08 MiB, reclaiming the exact 118.4–161.3 MB entries. PR Checks 29464742361 and Golden E2E 29464742368 passed. The artifact workflow is red only for the retained Windows arm64 hosted build 26200 vs required 26100 floor gap after its primary proof. No Electron/downloader/SSH/settings/tuple/publication/default consumer is connected; legacy remains default. Next gate: audit and RED-test only the disconnected official-build packaged-manifest/key and app-owned cache-root boundary.

Jinwoo-H avatar Jul 16 '26 02:07 Jinwoo-H

Packaged-manifest loader checkpoint

Implementation commit: ffc7947a4afe823fe56c4972cca4af8c509eca83 Evidence commit: 6358fb466

Exact-head native run 29466359518 passes the new fixed-resource loader contract step and complete primary job on all six native clients: Linux x64/arm64, macOS x64/arm64, and Windows x64/arm64 under Node 24.18.0. PR Checks 29466359581 and Golden E2E 29466359541 pass.

The artifact workflow is red only for the declared Windows arm64 oldest-floor mismatch: the exact runtime, Node, PTY, watcher, and settlement smoke pass, then hosted build 26200 is rejected against required build 26100. No tuple is enabled.

This remains source-only and disconnected: no production key/secret, embedded manifest bytes, builder mapping, Electron consumer, cache root, downloader, SSH path, Beta mode, publication, or default behavior. Next gate is a purpose-named audit/RED for the smallest PR-contained accepted-key and immutable resource-input contract.

Jinwoo-H avatar Jul 16 '26 02:07 Jinwoo-H

Checkpoint at 4c09902c0: added a disconnected compile-time manifest trust-root boundary. Current desktop builds inject literal null; there is still no production key, packaged manifest resource, consumer, SSH behavior, tuple, publication, or default-path change. Local proof: 3/3 focused, 22/22 trust, 307 SSH-relay tests (+3 declared full-size skips), 279 release-script tests, workflow oracle, typecheck, lint, format, max-lines, and resolver zero-diff all pass. Exact-head gates: artifact run 29470322099, PR Checks 29470322090, Golden E2E 29470322011. Real Apple/SignPath rehearsal remains deferred to the late native-trust gate.

Jinwoo-H avatar Jul 16 '26 04:07 Jinwoo-H

Work Package 4 checkpoint at 749f775f15cbd92354fe43e4c142900d4b921614:

  • Closed the prior compiled-trust and draft-upload stream package under E-M5-COMPILED-TRUST-CI-001 at bb7493614: all six primary native jobs, Linux supplements, Windows x64 baseline, PR Checks, and Golden E2E passed; Windows arm64 remains correctly gated because the hosted runner is build 26200 rather than required 26100.
  • Added only a disconnected official-manifest composition. Absent compiled trust returns unavailable before filesystem access; present trust is the only accepted-key source and the result binds the verified fixed-resource manifest to the canonical key fingerprint.
  • Local proof: 4/4 focused, 26/26 trust, 311/311 non-full-size SSH relay, 280/280 release scripts, workflow oracle 7/7, typecheck, lint/reliability/max-lines/localization, format, and diff checks pass.
  • Replacement CI: artifact 29471918803, PR Checks 29471918846, Golden E2E 29471918827.

The build constant remains null. No production key or manifest resource, Electron/product caller, cache/downloader orchestration, SSH behavior, Beta mode, tuple, publication, or default-path change exists. Legacy remains the production default; SignPath is deferred to its late gate.

Jinwoo-H avatar Jul 16 '26 04:07 Jinwoo-H

Cache-root checkpoint (aefcaa9a9): pure absolute user-data -> fixed ssh-relay-runtime-cache/v1 derivation is locally green and disconnected. Evidence: 3/3 focused, 10/10 focused+workflow oracle, 314/314 non-full-size SSH relay tests (3 declared full-size skips), 280/280 release-script tests, typecheck/lint/format/diff gates. Both POSIX and PowerShell native artifact commands now run the purpose suite. No Electron caller, filesystem/cache orchestration, download/SSH/Beta/tuple/publication/default behavior. Exact-head runs: artifact 29472780636, PR Checks 29472780621, Golden E2E 29472780625, computer-use 29472780628.

Jinwoo-H avatar Jul 16 '26 05:07 Jinwoo-H

Warm-cache resolution checkpoint (22031fa68): disconnected verified-manifest selection -> strict cache lookup -> in-use lease composition is locally green. Evidence: 9/9 purpose tests, 16/16 focused+workflow oracle, 323/323 non-full-size SSH relay tests (3 declared full-size skips), 280/280 release scripts, typecheck/lint/format/diff gates. Missing trust/legacy states do zero cache I/O; misses do not download; hits acquire a lease before exposure; corruption and lease failures propagate closed; cancellation after acquisition releases the lease. No Electron/startup/SSH/Beta/tuple/publication/default caller. Exact-head runs: artifact 29474175664, PR Checks 29474175599, Golden E2E 29474175584, computer-use 29474175581.

Jinwoo-H avatar Jul 16 '26 05:07 Jinwoo-H

Checkpoint: pushed 3018977c1 (feat: populate verified relay cache). This remains a disconnected capability: cache-local exclusive download staging → exact verified download identity → existing strict immutable publication/complete-tree proof → staging cleanup → in-use lease. Real in-memory Electron integration passes for Linux tar/Brotli and Windows ZIP fixtures, including the next logical-root warm lookup/lease. Evidence exposed and corrected a logical /var vs physical /private/var lease-root mismatch without weakening missing/misplaced entry rejection. Local: 21/21 focused+workflow-oracle, 332/332 non-full-size SSH relay, 280/280 release scripts, typecheck, lint/reliability/max-lines/localization, formatting, and diff checks pass. Protected resolver pair unchanged. Exact-head runs: artifact 29475848463; PR Checks 29475848470; Golden E2E 29475848455; computer-use 29475848589. No Electron/startup/SSH/settings/fallback/tuple/publication/default caller; legacy remains default; SignPath deferred.

Jinwoo-H avatar Jul 16 '26 06:07 Jinwoo-H

M5 / Work Package 4 cache-lock correction checkpoint

  • Exact head: bd240049ffb9de196ce7cbd0f772639f4ba310f3
  • Corrects the repeated Windows x64 EPERM release race with a 5 s / 50 ms retry limited to EPERM/EACCES.
  • Every retry rechecks exact directory identity and owner nonce; displacement preserves the successor; exhaustion and unexpected failures remain fail-closed.
  • Local proof: 24/24 focused + workflow oracle, 339/339 non-full-size relay tests (3 declared full-size skips), 280/280 release-script tests, typecheck, lint, format, diff, and protected-resolver gates.
  • Replacement runs: artifact 29476740292, PR Checks 29476740298, Golden E2E 29476740309, computer-use 29476740291.

Cold-cache population remains unaccepted until all six primary native jobs and adjacent checks close at this exact head. No Electron/startup, SSH setting, fallback, tuple, publication, or default behavior is connected; legacy remains default. SignPath remains deferred.

Jinwoo-H avatar Jul 16 '26 06:07 Jinwoo-H