Repository navigation
fix(science): skip comments and blank lines in pinned requirements - #813
Merged
Ishaan Gangwani (ishaan1124) merged 2 commits intoSep 29, 2026
Conversation
ANIRUDDHA ADAK (aniruddhaadak80)
requested review from
Aayam Bansal (aayambansal) and
Ishaan Gangwani (ishaan1124)
as code owners
September 28, 2026 19:58
|
ANIRUDDHA ADAK (@aniruddhaadak80) is attempting to deploy a commit to the InkVell Team on Vercel. A member of the Team first needs to authorize it. |
ANIRUDDHA ADAK (aniruddhaadak80)
force-pushed
the
fix/requirements-comment-lines
branch
from
September 29, 2026 04:51
34adc09 to
4745b18
Compare
Every line became a pin, so a comment produced a pin of "#" with no version and a blank line one of "". The exact coverage check in verifiedWheels compares the parsed count against the requested pins, so a requirements file with an ordinary header failed to install and the task environment was never built.
ANIRUDDHA ADAK (aniruddhaadak80)
force-pushed
the
fix/requirements-comment-lines
branch
from
September 29, 2026 10:48
4745b18 to
9d8cdc2
Compare
# Conflicts: # CHANGELOG.md
Ishaan Gangwani (ishaan1124)
merged commit Sep 29, 2026
2df9efc
into
synthetic-sciences:main
8 of 9 checks passed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The hashed-requirements parser treated every line as a pin:
A comment line becomes
pin: "#",offset: -1, soname: ""andversion: "h". A blank line becomespin: "",version: "n".That then fails its own coverage check in
verifiedWheels:so
ensureWheelArchivestreats the wheel cache as unverified, re-downloads on every call, and finally throws"Downloaded wheels do not exactly cover the hashed task requirements".Why it matters
TaskSpec.pip_requirementsis agent- or author-supplied and validated only asz.string().trim().min(1).max(100_000)— unlikecapability/schema.ts:154, which does require every non-blank line to carry--hash=sha256:.So a completely ordinary
requirements.txt— a single# pinned by release 2.0header, or a blank line between sections — can never produce a managed task environment. The cache is written but never accepted, and the error blames wheel coverage rather than the comment line.It fails loudly, so this is a parser defect rather than a silent research-corruption bug, but it blocks a legitimate input outright.
Verification
requirementArtifactswas module-private and every test inenvironment-manager.test.tsthat reaches this path istest.skipIf(!capabilityPlatform()), so nothing covered it. This exports it and adds a direct test.To show the parser defect independently of the export, I ran the new test against the original logic with only the
exportkeyword added:With the fix:
The fixture is a five-line file (comment, pin, blank, pin, whitespace) so it pins both the comment and blank-line case, and the last test keeps multi-hash pins and the empty-input guard working.
The change
The only other reference to the symbol is
verifiedWheelsin the same file, and it keeps the same shape and the same return type — only the count changes.bun run typecheckclean; touched files are Prettier-clean (checked on LF-normalized copies — this checkout hascore.autocrlf=true, which makes Prettier flag every file in the repo).Fixes #812