Repository navigation
fix(coverage): admit exact base VCS sources #1210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
045152a
fix(coverage): admit exact base VCS sources
seonghobae 163da58
fix(coverage): fail closed on VCS import roots
seonghobae 498c93a
Merge remote-tracking branch 'origin/main' into fix/opencode-exact-vc…
seonghobae 030f202
Merge remote-tracking branch 'origin/main' into fix/opencode-exact-vc…
seonghobae 72ad181
fix: harden VCS import permissions
seonghobae 6e644df
fix: validate VCS import layouts
seonghobae 42a5229
Merge branch 'main' into fix/opencode-exact-vcs-base-deps
seonghobae 4ada73b
Merge main and isolate independent base lock environments
seonghobae 71aed94
fix: isolate same-repository scheduler API credentials
seonghobae 3d5824d
fix: clarify VCS-only dependency evidence
seonghobae eae3b6f
Merge remote-tracking branch 'origin/main' into fix/opencode-exact-vc…
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # OpenCode exact VCS dependency evidence | ||
|
|
||
| ## Decision | ||
|
|
||
| The OpenCode coverage image may expose a Python dependency directly from source | ||
| only when the validated base branch's frozen `uv.lock` names an HTTPS GitHub | ||
| repository owned by `ContextualWisdomLab` and a full 40-character Git commit. | ||
| Registry dependencies remain exact-version, SHA-256-pinned `pip` installs. | ||
|
|
||
| The trusted materializer separates those two dependency classes. The networked, | ||
| secret-free image build fetches each approved source revision, verifies that | ||
| `FETCH_HEAD` and the checked-out `HEAD` equal the locked commit, removes Git | ||
| metadata, verifies a normalized package import root, and records only that | ||
| repository root or its `src` directory in a Python path file. It does not run | ||
| dependency build or installation code. The pull-request tree still runs later | ||
| with no network and no credentials. | ||
|
|
||
| ## Root cause | ||
|
|
||
| LineageWeave's protected base lock contains RankWeave at its immutable release | ||
| commit because the current RankWeave release is not yet available from PyPI. | ||
| `uv export` therefore emitted one exact VCS requirement alongside fully hashed | ||
| registry requirements. The former materializer rejected the complete export, | ||
| so OpenCode never reached tests and repeatedly requested changes despite the | ||
| product's current-head tests passing. | ||
|
|
||
| ## Safety boundary | ||
|
|
||
| - Symbolic refs, abbreviated commits, non-HTTPS schemes, credentials, ports, | ||
| query strings, fragments, subdirectories, and repositories outside the exact | ||
| organization origin fail closed. | ||
| - Duplicate references to one repository must resolve to one commit; conflicting | ||
| revisions fail before the image build. | ||
| - Only metadata read from the validated base SHA can select a dependency. Pull | ||
| request source cannot modify the networked image build inputs. | ||
| - Source dependencies are import-only. No `pip install`, PEP 517 backend, setup | ||
| hook, or dependency lifecycle script runs while the network is available. | ||
| - The source repository must be publicly fetchable without credentials, expose | ||
| the normalized top-level import package directly or under `src`, and remain a | ||
| pure-Python leaf dependency. Private repositories, environment-marked VCS | ||
| requirements, namespace/layout aliases, installed-distribution metadata, | ||
| entry points, compiled extensions, and registry packages that require the VCS | ||
| distribution fail closed instead of expanding the secret-free build boundary. | ||
| - The checkout roots and path file are explicitly world-readable so the later | ||
| networkless coverage container can run as UID 65532 independently of the | ||
| image builder's umask. | ||
| - This records exact source inputs for a test image; it does not claim a SLSA | ||
| build level or substitute for upstream package publication and attestation. | ||
|
|
||
| These controls follow pip's recommendation to use full VCS commit hashes and | ||
| SLSA 1.2's treatment of Git revisions as immutable identifiers, while retaining | ||
| the isolated, ephemeral test execution boundary (Python Packaging Authority, | ||
| 2026; Supply-chain Levels for Software Artifacts, 2025). They also support the | ||
| SSDF practice of preserving dependency provenance and preventing recurrence of | ||
| toolchain failures (Souppaya et al., 2022). | ||
|
|
||
| ## Verification | ||
|
|
||
| Regression tests cover the real LineageWeave export shape, rejection of unsafe | ||
| VCS forms, conflicting commits, deterministic manifests, exact-fetch workflow | ||
| commands, and the existing registry hash contract. Before source-only Python | ||
| path publication, the image build requires exactly one normalized root, a | ||
| regular `__init__.py` for packages, and no symbolic links, compiled extensions, | ||
| or installed distribution metadata. Namespace, alias/ambiguous, and native | ||
| layouts therefore fail the build. The central Python quality workflow retains | ||
| 100% statement/branch and docstring coverage. | ||
|
|
||
| ## References | ||
|
|
||
| Python Packaging Authority. (2026). *VCS support*. pip documentation v26.2. | ||
| https://pip.pypa.io/en/stable/topics/vcs-support/ | ||
|
|
||
| Souppaya, M., Scarfone, K., & Dodson, D. (2022). *Secure software development | ||
| framework (SSDF) version 1.1: Recommendations for mitigating the risk of | ||
| software vulnerabilities* (NIST Special Publication 800-218). National | ||
| Institute of Standards and Technology. https://doi.org/10.6028/NIST.SP.800-218 | ||
|
|
||
| Supply-chain Levels for Software Artifacts. (2025). *SLSA specification | ||
| (Version 1.2)*. https://slsa.dev/spec/v1.2/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.