Skip to content

Prototype verified installation and local workspace launcher - #35

Merged
christophersesugh merged 3 commits into
mainfrom
feat/ws-i17-verified-setup-launcher
Dec 3, 2026
Merged

christophersesugh merged 3 commits into
mainfrom
feat/ws-i17-verified-setup-launcher

Conversation

@christophersesugh

Copy link
Copy Markdown
Contributor

WS-I17

  • Automate explicit acquisition of the six pinned public release assets and hash-pinned dependency wheels, staging before publication. No Git/account/CLI client required.
  • Install from local assets into a dedicated CPython 3.11 environment, using the existing isolated Toolkit verifier, independent steward fingerprint and signed-archive installer. Preserve prior stores and reject existing environments, invalid assets and unrelated runtime files.
  • Add explicit open --prototype folder selection/create flow with verified source, a tested trusted loopback/browser-launch seam and manual fallback. No actual HTTP listener, session, browser UI or release publication; those remain WS-I20/21/23.
  • Record distribution choice, supported binary/platform constraints, prerequisites, offline transfer, repair and uninstall. Keep manual Markdown/CLI setup.
  • Exercise actual acquisition, offline installation, and create/open in existing three-platform official release CI, plus mocked negative regression tests.

Base: signed WS-I16 merge 19d856a3fff6c24ac53626f5493045fb4866b549. Context #332 records WS-I16 acceptance; its documentation merge is separate. Local git access fails to resolve github.com, so local tests were not executed. Review, CI, signed commits and prototype verification remain required. No new third-party runtime dependency or package publication.

@christophersesugh christophersesugh left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WS-I17 review — changes required

Reviewed head e285a09cf5ec01eec8e10dcf2fcf5b5e217df0f2 against base 19d856a3fff6c24ac53626f5493045fb4866b549 and context 399b77d5aa48e6eb4a0a5832ac310e79bfb20d20: WS-I17, Specification 0006 WSB-002/004/013, Specification 0005 and accepted ADR-0006. Real transport/session/UI work remains outside this ticket.

Two actionable implementation findings are attached. Separate merge gate: DCO failed (run); both 939c35db5cf5bc08ddd47685da0215b7c707df2d and e285a09cf5ec01eec8e10dcf2fcf5b5e217df0f2 lack Signed-off-by and GitHub reports both unsigned. Follow CONTRIBUTING.md and the project's signed-commit procedure before merge.

Quality, release contracts, independent readiness and official release smoke passed for the PR-associated head. The official smoke jobs confirm acquisition, offline install and create/open on Ubuntu, macOS and Windows, plus cross-platform digest comparison. Static GitHub inspection only; no independent execution. Source acceptance and final-merge verification remain separate. No approval or merge performed.

def acquire(runtime: Path) -> Path:
assets = runtime / "assets"
if exists(assets):
verify_assets(assets)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Cached dependency wheels can be corrupt while acquisition reports verified success. acquire() returns an existing cache after verify_assets(); that function checks the six release assets' hashes but only checks that the wheels directory is nonempty and contains regular .whl files (lines 115–119). Replace a cached required wheel with arbitrary bytes, or leave only an unrelated .whl, and --mode acquire still exits 0 and prints 'already verified'. The offline target discovers the error only at installation, potentially after transfer to an offline machine. This contradicts WS-I17's verified acquisition/invalid-asset acceptance and WSB-002's verified offline acquisition route. The installation hash checks do prevent execution; this is an acquisition correctness and repairability defect, not a claimed signature bypass. Reuse the existing pinned requirements via an offline pip hash-check/download-to-temporary-directory (or equivalent canonical verification) to ensure all required compatible wheels are present and valid before returning a reused cache. Keep the existing install checks. Add tests with genuine or disposable hash-pinned wheels for corrupted, missing and unrelated-only cached wheels, checking that acquisition fails without replacement or network access.

canonical = path.parent.resolve(strict=True) / path.name
if canonical == ROOT or canonical.is_relative_to(ROOT) or ROOT.is_relative_to(canonical):
raise ValueError("runtime must be separate from the application tree")
path.mkdir(mode=0o700, exist_ok=True)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Setup permits a runtime inside an already identifiable learner workspace. runtime_directory() rejects overlap with ROOT and unrelated direct children of the runtime, but never checks a selected runtime's ancestors for the canonical learner lock. For example, given a learner folder study/ with oee-curriculum.lock.json and notes, --runtime study/runtime --mode acquire creates and populates a new runtime within learner data. prepare_workspace(study, study/runtime) then rejects that same learner root due to the overlap check. This violates accepted ADR-0006 / WSB-004 application-runtime/learner separation, and makes the documented workflow fail after acquisition. Before any mkdir or network call, reject a runtime nested inside an identifiable learner root (at minimum an ancestor with the canonical workspace lock, including linked or malformed lock entries); explicitly document that users must choose a dedicated sibling location for ordinary lockless learner folders, which cannot be inferred reliably. Add a regression test confirming the new runtime is not created and existing learner bytes remain unchanged.

Copy link
Copy Markdown
Contributor Author

Both P2 findings addressed in 26f42041f1bcec1a492954a001cfc79ee752cd41.

  • Cached acquisition and offline installation now resolve the complete pinned binary-wheel requirements using pip download in a fresh temporary directory with --no-index --require-hashes --no-deps. Missing, corrupt or unrelated-only wheels fail without fetching replacements or modifying the cache. Installation independently retains the existing hash checks. Added a real offline pip regression using disposable hash-pinned wheels; the isolated pip fixture was executed locally (valid: exit 0; corrupt, missing, unrelated-only: exit 1).
  • Before creating a runtime, inspect both requested and canonical paths and their ancestors for the canonical learner lock entry, without following or parsing it. A valid, malformed, directory or dangling linked lock rejects setup. Regression cases verify no runtime directory and unchanged learner bytes. The guide explicitly requires a sibling runtime for lockless folders.

Full repository tests remain unexecuted locally; final-head CI, re-review and signing/DCO remain required.

@christophersesugh christophersesugh left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WS-I17 re-review — source findings resolved

Reviewed remediation commit 26f42041f1bcec1a492954a001cfc79ee752cd41 against the previous reviewed head and unchanged context revision 399b77d5aa48e6eb4a0a5832ac310e79bfb20d20.

  • Cached wheel verification: resolved. verify_assets() now uses fresh temporary offline pip resolution with the canonical requirements, binary-only, hash checks and no dependencies/index; installation retains independent checks. The new real-pip regression covers valid, corrupt, missing and unrelated-only caches and preservation of cache bytes.
  • Runtime separation: resolved. Pre-mutation checks inspect requested and resolved ancestors using lstat, reject malformed/dangling lock entries, and document the explicit sibling requirement for lockless folders. Regression tests cover nested paths and preservation.

No new actionable source findings in the remediation. Standards and specification source review pass for the bounded WS-I17 prototype. Quality, release contracts, independent readiness and official three-platform smoke passed on the updated head. No independent local test execution performed by this reviewer.

Merge remains blocked by DCO/signing: DCO run failed; all three commits lack sign-offs and GitHub reports unsigned. Correct the commit history and verify the resulting head before merge. No formal approval or merge performed; exact-main verification and ticket acceptance remain separate.

@christophersesugh
christophersesugh force-pushed the feat/ws-i17-verified-setup-launcher branch from 26f4204 to b90f7af Compare December 3, 2026 02:31
@christophersesugh
christophersesugh merged commit 82115db into main Dec 3, 2026
10 checks passed
@christophersesugh
christophersesugh deleted the feat/ws-i17-verified-setup-launcher branch December 3, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant