You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: ignore untracked manifests during dependency preparation - #304
manifests() now uses Git's tracked-file list, so ignored or untracked generated package.json files do not enter dependency planning, fingerprinting, staging, completeness checks, or lifecycle-build detection. A preparation-level regression test covers an ignored .output/server/package.json with dependencies.
Routing: profile cheap_coder, requested model openai/gpt-6-luna, effort high, resolved model ?.
Diagnosis
The reported symptom reproduced: an ignored .output/server/package.json with a non-empty dependencies map made preparation return incomplete with frozen install returned success without required dependency outputs. Reproduction command: rtk python3 /tmp/code-cycle-tmp-l9_r8s5k/repro.py.
The issue's hypothesis was confirmed. manifests() walked the filesystem without checking Git tracking, so generated manifests became package inputs and prepare() required their nonexistent install outputs. The broken invariant was that only Git-tracked manifests define source packages. Fixing manifest discovery restores that invariant at the shared input boundary.
The widened search covered dependency preparation, package.json, the reported error, and scripts/dependency_setup.py; it found related historical work item #279 and merged PR #287, which introduced frozen Node dependency preparation but did not settle this ignored-manifest case. No other open work item was found.
Work units
Unit
Behaviour
Files
Tests
Verification
Rollback
WU-1
Exclude generated manifests from dependency preparation
29 errors and 609 warnings across the files; no error on the changed function or regression method; no baseline comparison
static
git diff --check
0
clean
The test fixtures use temporary Git repositories and a mocked package-manager runner. They do not establish real sandbox confinement. The configured CI policy is parallel; checks for the pushed head are reported separately by the implementation stage.
Implemented #303 in commit 4ba0dc982a40bedd99b66710800f54e8ab650da3. Dependency preparation now considers Git-tracked package.json files only, and the regression test confirms an ignored generated .output/server/package.json no longer blocks preparation or enters the staged tree.
Local verification: python3 -m unittest discover -s tests passed (1,691 tests); python3 scripts/validate-package.py passed; python3 -m unittest exited 0 but discovered 0 tests. basedpyright scripts/dependency_setup.py tests/test_dependency_setup.py exited 1 with 29 errors and 609 warnings; no error was reported on the changed function or regression method, and no baseline comparison was run.
Checks for head 4ba0dc982a40bedd99b66710800f54e8ab650da3: 0 passed, 0 failed, 5 pending (queued/running): Skills, manifests, and Bash installer; Windows test shard (windows-1); Windows test shard (windows-2); Windows test shard (windows-3); Windows test shard (windows-4).
Status: REVIEW_PASSED_AWAITING_CI. Head 4ba0dc982a40bedd99b66710800f54e8ab650da3 was fully reviewed; no open finding blocks approval. This is not an approval: the CI gate decides once the checks finish (CI policy: parallel).
Reviewed scope
Accumulated diff origin/main...HEAD (merge base 4d45a2893272e80c9632ab5f104ecfc3d837db3c, 60 lines, 2 files): scripts/dependency_setup.py and tests/test_dependency_setup.py. Applied project convention: AGENTS.md (tool routing only; no project-specific review rules).
manifests() now lists git ls-files -z --cached under the project directory instead of walking the filesystem, so ignored or untracked generated package.json files (for example .output/server/package.json) no longer enter planning, fingerprinting, staging, or the completeness check. prepare() already stages from the same tracked list (names), so manifest discovery and staging now agree. A non-zero git ls-files exit raises ValueError instead of silently returning no manifests.
Findings
None.
Security triage
No security_review.always_when rule is configured, so the built-in defaults apply. The rule does not fire on changed paths or labels (none). My own reading flagged the dependency-preparation surface, so I audited it inline; the delegated cc-security-review skill was not run (degraded pass). Result: no vulnerability. The change only narrows what is installed (tracked manifests only). git runs with an argv list and no shell, a 30 s timeout, and cwd fixed to the project; returned paths are repository-relative and joined onto root; output-path escape checks in prepare() are unchanged.
Commands executed (all exit 0)
Command
Result
python3 -m unittest tests.test_dependency_setup
28 tests passed, including test_ignored_generated_manifest_does_not_block_preparation
python3 -m unittest discover -s tests
1691 tests passed
python3 scripts/validate-package.py
VALID: 16 skills, shared sections in sync, manifests aligned
python3 -m unittest
0 tests discovered (the suite lives under tests/)
I did not run the new test against the base code to confirm it fails there. The PR author reports reproducing the original failure.
Unverified
Real npm/srt installs: the tests use temporary Git repositories and a mocked runner, as the PR states. The runtime preparation evidence for this head reports prepared for an npm project.
Windows behaviour of the new git ls-files path handling relies on the Windows shards in CI.
CI (head 4ba0dc9, read once, not awaited)
All Validate package checks are IN_PROGRESS: Skills, manifests, and Bash installer, Windows test shard (windows-1), (windows-2), (windows-3), (windows-4). Passed: 0, failed: 0, pending: 5.
Residual risks
Behaviour change: a new, not-yet-git added package.json is no longer prepared. It is consistent with staging, which already used tracked files only.
projects() still discovers lock roots by walking the filesystem. An ignored generated directory holding both package.json and a lockfile would still become a plan, now with an empty manifest list. This is outside the reported symptom and not covered by a test. It is not a finding.
Verdict
No blocking findings on the reviewed head. Awaiting the 5 pending checks.
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
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.
Summary
manifests()now uses Git's tracked-file list, so ignored or untracked generatedpackage.jsonfiles do not enter dependency planning, fingerprinting, staging, completeness checks, or lifecycle-build detection. A preparation-level regression test covers an ignored.output/server/package.jsonwith dependencies.Work item: #303
Routing: profile
cheap_coder, requested modelopenai/gpt-6-luna, efforthigh, resolved model?.Diagnosis
The reported symptom reproduced: an ignored
.output/server/package.jsonwith a non-emptydependenciesmap made preparation returnincompletewithfrozen install returned success without required dependency outputs. Reproduction command:rtk python3 /tmp/code-cycle-tmp-l9_r8s5k/repro.py.The issue's hypothesis was confirmed.
manifests()walked the filesystem without checking Git tracking, so generated manifests became package inputs andprepare()required their nonexistent install outputs. The broken invariant was that only Git-tracked manifests define source packages. Fixing manifest discovery restores that invariant at the shared input boundary.The widened search covered dependency preparation,
package.json, the reported error, andscripts/dependency_setup.py; it found related historical work item #279 and merged PR #287, which introduced frozen Node dependency preparation but did not settle this ignored-manifest case. No other open work item was found.Work units
scripts/dependency_setup.py,tests/test_dependency_setup.pySetupTests.test_ignored_generated_manifest_does_not_block_preparationpython3 -m unittest discover -s tests(1,691 passed);python3 scripts/validate-package.py(passed);python3 -m unittest(0 discovered); basedpyright reported diagnostics, as detailed below4ba0dc982a40bedd99b66710800f54e8ab650da3Verification
python3 -m unittest discover -s testspython3 scripts/validate-package.pypython3 -m unittestbasedpyright scripts/dependency_setup.py tests/test_dependency_setup.pygit diff --checkThe test fixtures use temporary Git repositories and a mocked package-manager runner. They do not establish real sandbox confinement. The configured CI policy is parallel; checks for the pushed head are reported separately by the implementation stage.
Commit:
4ba0dc982a40bedd99b66710800f54e8ab650da3