fix(selfhost): keep Claude review instructions out of argv#3951
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3951 +/- ##
==========================================
- Coverage 93.66% 93.66% -0.01%
==========================================
Files 372 372
Lines 34856 34855 -1
Branches 12743 12742 -1
==========================================
- Hits 32649 32648 -1
Misses 1588 1588
Partials 619 619
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 07:54:15 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
ps//proccan expose them.repoInstructionsinto a--append-system-promptflag for the Claude CLI, exposing container-local review guides and skills loaded fromGITTENSORY_REPO_CONFIG_DIR.Description
--append-system-prompt <systemAppend>for Claude Code CLI invocations and instead prepend thesystemAppendinto the CLI stdin prompt path using a shared helper. (src/selfhost/ai.ts)prependCodexSystemAppendtoprependCliSystemAppendand use it for both Claude Code and Codex so CLI providers share the same stdin-prepend behavior. (src/selfhost/ai.ts)systemmessages before prepending so the prompt contains thesystemAppendexactly once. (src/selfhost/ai.ts)test/unit/selfhost-ai.test.ts)Testing
npx vitest run test/unit/selfhost-ai.test.tsand the focused tests matchingClaude Code keeps systemAppend|Codex prepends systemAppend, which passed locally.npm run typecheckwhich completed successfully.npm run selfhost:env-reference:checkwhich completed successfully.npm run test:ci, but it could not complete in this environment due to unrelated environmental/test failures (transientactionlintsetup network errors and a pre-existingtest/unit/queue.test.tsrecursive mock stack overflow encountered during coverage collection), so the full gate was not finished here.npx vitest run test/unit/selfhost-ai.test.ts --coveragewhere the tests passed but coverage report generation failed withTypeError: jsTokens is not a function(coverage tooling issue in this environment).Codex Task