Repository navigation
Prototype verified installation and local workspace launcher - #35
Conversation
christophersesugh
left a comment
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
[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) |
There was a problem hiding this comment.
[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.
|
Both P2 findings addressed in
Full repository tests remain unexecuted locally; final-head CI, re-review and signing/DCO remain required. |
christophersesugh
left a comment
There was a problem hiding this comment.
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.
Signed-off-by: Christopher S. Aondona <[email protected]>
…rage Signed-off-by: Christopher S. Aondona <[email protected]>
Signed-off-by: Christopher S. Aondona <[email protected]>
26f4204 to
b90f7af
Compare
WS-I17
open --prototypefolder 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.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.