Repository navigation
fix(claude): preserve native requests with workload markers - #28
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Accepted riskAccepted by ericlitman: HOUSE-97 (authority 48fa77b) 🟡 Medium · Workload-tagged UA can be pinned as the stabilized device profile DetailsRun: @unfret review · @unfret status · @unfret help |
|
Confirmed finding: workload-tagged User-Agent can be retained by the optional device-profile stabilization cache and replayed on ordinary requests. Disposition: pre-accepted, not fixed. This deployment does not enable stabilization: The finding is valid for the enabled configuration. No claim is made that all supported configurations are unaffected. The demonstrated consequence is request workload mislabeling in that optional mode; no security, secret exposure, data loss or gate-integrity consequence was identified. The invoked run-these/babysit-pr standing reachability policy pre-accepts confirmed findings whose trigger lies outside actual usage and lacks those excluded consequences. This is the operator's application of that policy, not new approval attributed to Eric. Exact head: ca7a762. |
✅ Merged into
|
| Condition | Required by | |
|---|---|---|
| ✅ | github-review-approved |
GitHub repository ruleset rule Mergify merge protections |
| ✅ | -draft |
Merge Protections rule Required checks |
| ✅ | -label = hold |
Merge Protections rule Required checks |
The batch, tested in place
| Condition | Required by | |
|---|---|---|
| ✅ | check-success = Analyze (actions) |
Merge Protections rule Required checks |
| ✅ | check-success = Analyze (go) |
Merge Protections rule Required checks |
| ✅ | check-success = Analyze (javascript-typescript) |
Merge Protections rule Required checks |
| ✅ | check-success = e2e-hermetic |
Merge Protections rule Required checks |
| ✅ | check-success = go |
Merge Protections rule Required checks |
| ✅ | check-success = @unfret/Unfret |
Merge Protections rule Unfret on risky paths |
| ✅ | any of: check-success = @mergify/Mergify Merge Protections, check-neutral = @mergify/Mergify Merge Protections, check-skipped = @mergify/Mergify Merge Protections |
GitHub repository ruleset rule Mergify merge protections |
Times in UTC · dashboard · how the merge queue works
Summary
Claude Code appends
workload/cronto scheduled requests. The native detector rejected that valid suffix, so scheduled turns took the cloaking path and changed the cached prompt prefix.Accept one optional final
workload/[a-z0-9_-]+segment. Existing version, entrypoint and strong-signal checks remain in place. No executor payload or routing policy changes.Linear: HOUSE-97
Related: HOUSE-96 (deployment and observations), HOUSE-98 (explicit client cache TTL).
Introduced by: router-for-me/CLIProxyAPI#4752
Evidence
TestClaudeNativeWorkloadMarkerKeepsOutboundPrefixIdenticalfails in all four cases with production source restored toed0d889f41c7a63e2545cc0b814e5c3d536b2dd7: streaming/nonstreaming × bare/explicit-one-hour cache controls. Workload-marked calls rewrite the system, messages and tools.After: all four cases pass on
ca7a762078a3f84ebedfa29b29b008033e02edbd. Ordinary → cron → ordinary calls keep identical outbound system content and preserve incoming messages, tools, cache controls and User-Agent, using the same synthetic account/session and mocked HTTP transport.go test ./internal/runtime/executor -run TestClaudeNativeWorkloadMarkerKeepsOutboundPrefixIdentical -vandgo test ./internal/runtime/executor/helps -run 'TestDetectClaudeCode'.Merge Danger
Door: two-way
Revert the parser change to restore prior classification. No migration or persistent-data change.
Blast Radius: Claude
Workload-marked native Claude requests now retain their native prompt and identity. Apply explicit client main-conversation TTL settings before deployment: fixing classification removes the old cloaking path's automatic one-hour upgrade. Correct SDK identity may have different upstream quota metering; this change makes no quota-savings claim.
Device-profile stabilization is disabled in the target deployment (also the default). If enabled elsewhere, accepting a workload-marked User-Agent can make it eligible for the existing learned profile; that optional-mode interaction is recorded as an unacted advisory.
client-app/remains outside the accepted shape because the observed client does not emit it.Acceptance criteria
Done: the shared plausibility regex is the failing boundary. Detail extraction already works. Streaming, nonstreaming and token-count paths use that boundary. Other signals and configured cloak behavior are unchanged.
Done: the wire regression and detector tables described above. Explicit one-hour TTL preservation is included. Token counting is proved at the detector boundary, not through a separate executor wire test.
Local gate complete as recorded below; CI, Unfret and Mergify pending at PR creation.
Post-merge release/deployment is owned by HOUSE-96/HOUSE-97 and remains pending. Local scheduled/native proof is complete. Client TTL configuration and four-host live TTL probes are complete under HOUSE-98.
Gate results
Parent-run gate on committed
ca7a762078a3f84ebedfa29b29b008033e02edbd:git diff --check origin/main...HEAD: exit 0.gofmt -lon all three changed Go files: empty output, exit 0.go build -o test-output ./cmd/server: exit 0; temporary binary removed.go test ./...: exit 0.no-commentspass: no scoped comments/suppressions, no edits, no unenforced constraints.Not verified
Need help on this PR? Tag
@codesmith-botwith what you need.