Skip to content

fix(tier3): preserve local Claude Code instruction variables - #252

Merged
rng1995 merged 1 commit into
mainfrom
naren/fix-local-claude-code-prompt
Oct 29, 2026
Merged

rng1995 merged 1 commit into
mainfrom
naren/fix-local-claude-code-prompt

Conversation

@rng1995

@rng1995 rng1995 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Local Claude Code trials received an empty prompt because the command environment filter dropped Harbor 0.24.0's HARBOR_CLAUDE_CODE_INSTRUCTION_<UUID> variable. Harbor then piped the empty value into claude --print, leaving attempts unscored.

Allow the exact UUID-based Claude Code instruction name and the legacy HARBOR_INSTRUCTION name. The change stays after loader rejection and protected-path checks, and uses a full match rather than allowing arbitrary HARBOR_* variables. Existing local path translation remains in effect.

Closes #245.

Verification

  • I am familiar with the contributing guidelines
  • Added focused regressions and updated the changelog
  • Confirmed 5 prompt-delivery failures before the fix; all 39 focused cases pass afterward
  • Exercised the pinned Harbor command generator and real local subprocess boundary with a deterministic stdin-reading Claude CLI stub, both with sandbox mode off and under macOS Seatbelt
  • Checked quotes, multiline/Unicode input, literal shell syntax, launcher separation, protected paths, malformed instruction names, and loader rejection
  • Complete local environment, sandbox, contract and agent suites: 457 passed, 6 skipped, 6 deselected
  • make lint
  • Complete default project suite: the local four-worker run was interrupted after 2 failed, 2,713 passed, 7 skipped; full GitHub CI is pending
  • make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Independent review found no actionable issues.

The subprocess integration uses a deterministic CLI stub and makes no provider/model requests; a credentialed Claude Code evaluation was not run.

Local full-suite limits and control results

The interrupted four-worker project run hit 0.5-second output callback deadlines in:

  • tests/test_harbor_local_mode.py::test_local_callback_receives_complete_line_before_process_exit
  • tests/test_harbor_local_mode.py::test_local_callback_streams_safe_partial_line_before_process_exit

Both tests are unchanged from main and passed in the complete serial local-mode suite above. Isolated reruns passed on both this head (2 passed) and unchanged main ee40414b (2 passed). The complete local-mode suite also passes with four workers on unchanged main (273 passed, 1 skipped) and this head (289 passed, 1 skipped). These controls do not turn the failed broad project run into an all-green suite claim. Full GitHub checks remain pending.

Release Impact

  • Updated CHANGELOG.md

@rng1995
rng1995 marked this pull request as ready for review October 29, 2026 17:11
@rng1995
rng1995 enabled auto-merge October 29, 2026 17:30
@rng1995
rng1995 merged commit 3d6a63a into main Oct 29, 2026
17 checks passed
@rng1995
rng1995 deleted the naren/fix-local-claude-code-prompt branch October 29, 2026 17:44
@rng1995 rng1995 mentioned this pull request Oct 30, 2026
15 of 20 tasks
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
* fix(tier3): preserve local Claude Code instruction variables

Signed-off-by: Narendran Raghavan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: claude-code trials always fail in Tier 3 local mode (agent prompt is dropped)

1 participant