Skip to content

Routing robustness: constrain bare 'cost' + add transport signal (v0.6.7)#126

Merged
hxddh merged 1 commit into
mainfrom
claude/practical-euler-ihd2ht
Jun 21, 2026
Merged

Routing robustness: constrain bare 'cost' + add transport signal (v0.6.7)#126
hxddh merged 1 commit into
mainfrom
claude/practical-euler-ihd2ht

Conversation

@hxddh

@hxddh hxddh commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Closes the routing gaps flagged in the v0.6.2 audit and deferred since. Changes are to detect_domain only, guarded by the routing-corpus (every golden case must still recall its skill top-2) and the negative-corpus (false positives must not route).

Fixes

  1. Constrained the bare cost signature. [/cost/i] matched "cost center", "at all costs", "cost of downtime" and misrouted unrelated text to lifecycle-cost. It now requires a storage-cost neighbour token (storage/request/egress/transition/tier/bill/lifecycle/retrieval/IA/Glacier/Archive/GB/TB) — mirroring the already-guarded sync/transfer patterns. Verified: real cost cases still fire; "cost center" and "at all costs" no longer route. Two negative-corpus cases lock it.
  2. Added a transport signal to network-endpoint-access: RequestTimeout, connection reset / reset by peer, broken pipe, ECONNRESET, EPIPE, unexpected EOF — common mid-transfer failures that previously matched no signature and so didn't route.
  3. New golden case network-connection-reset-upload (large multipart PUTs reset by a new firewall/NAT middlebox; small PUTs and downloads fine → network transport, not auth), with a baseline — exercises and locks the new signal.

Deliberately not changed

NoSuchKey/NoSuchBucket were left unsignalled — they're genuinely ambiguous (consistency vs CLI vs protocol), and a hard signal would risk misrouting; better handled by triage context than a bare regex. Called out honestly rather than forcing a brittle rule.

Validation

All gates green (skill_integrity, version_reference, routing_contract, provider_scope, no_hardcoded_pricing, reference_scope, repo_size); 219 pytest + 21 extension tests (incl. the 2 new negative-corpus cases + routing-corpus recalling the new case); 32/32 baselines 100% PASS. Version 0.6.6 → 0.6.7.

🤖 Generated with Claude Code


Generated by Claude Code

Closes routing gaps from the v0.6.2 audit. detect_domain only; guarded by the
routing-corpus (every golden case still recalls its skill top-2) and negative-corpus
(false positives must not route).

- Constrained the bare 'cost' lifecycle signature, which matched "cost center" / "at
  all costs" / "cost of downtime" and misrouted to lifecycle-cost. It now requires a
  storage-cost neighbour token, mirroring the guarded sync/transfer patterns. Two
  negative-corpus cases lock it.
- Added a 'transport' signal to network-endpoint-access (RequestTimeout, connection
  reset / reset by peer, broken pipe, ECONNRESET, EPIPE, unexpected EOF) — common
  mid-transfer failures that previously matched no signature.
- New golden case network-connection-reset-upload (large multipart PUTs reset by a
  firewall/NAT middlebox; small PUTs/downloads fine -> network transport, not auth)
  with a baseline, exercising the new signal.

NoSuchKey/NoSuchBucket left unsignalled on purpose: genuinely ambiguous, a hard
signal would risk misrouting.

Validation: all gates green; 219 pytest + 21 extension tests; 32/32 baselines PASS.
Version 0.6.6 -> 0.6.7.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhkyBLeDtBTmvTdVBqgCAV
@hxddh hxddh merged commit ee66db2 into main Jun 21, 2026
7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd9e972670

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

[/连接(?:失败|超时|被拒)|证书|解析失败|无法访问/i, "network_cjk"],
[/VPC|endpoint|ENDPOINT/i, "endpoint"],
[/host\s*unreachable|no\s*route/i, "route"],
[/RequestTimeout|connection\s*reset|reset\s*by\s*peer|broken\s*pipe|\bECONNRESET\b|\bEPIPE\b|unexpected\s*EOF/i, "transport"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require context before treating EOF as transport

When a tool/config parsing error contains unexpected EOF, this bare transport alternative makes network rank ahead of the CLI/SDK skill because both domains score once and network is earlier in DOMAIN_SIGNATURES; for example detectDomain("rclone config failed: unexpected EOF while parsing config file") recommends storageops-network-endpoint-access before storageops-cli-sdk-diagnosis. This sends non-network EOF failures toward endpoint checks unless the pattern is constrained to HTTP/upload/connection context.

Useful? React with 👍 / 👎.

[/lifecycle/i, "lifecycle"],
[/Standard_IA|Glacier|Deep_Archive/i, "storage_class"],
[/cost|费用|计费|账单/i, "cost"],
[/\bcost\b.*\b(storage|request|egress|transition|tier|bill|lifecycle|retrieval|IA|Glacier|Archive|GB|TB)\b|\b(storage|request|egress|transition|tier|bill|lifecycle|retrieval|IA|Glacier|Archive|GB|TB)\b.*\bcost\b|费用|计费|账单/i, "cost"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep plural storage-cost mentions routable

The new guard only accepts the exact word cost, so common billing reports using plurals no longer match even with the intended storage-cost neighbor present; detectDomain("S3 storage costs increased this month"), "request costs for the bucket increased", and "egress costs are high" now produce no lifecycle-cost hit. This regresses ordinary cost-diagnosis wording that the previous substring pattern caught; allow costs? in the guarded form while still excluding idioms like at all costs.

Useful? React with 👍 / 👎.

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.

2 participants