Claim from the verified payload and matched requirements in the
resource server's onAfterVerify hook, so a forged header can no longer
reserve a legitimate payment's key, and an invalid payment takes no
claim. Fail closed on a store error or timeout by returning an abort
(a throwing hook is skipped and would run the handler unguarded);
document fail-open as an explicit, idempotent-only choice. Cover
Permit2 (BigInt nonce) and keep claims until validBefore/deadline.
The test now drives the real @x402/express middleware with payments
signed by the real @x402/evm client and a stand-in facilitator that
checks EIP-3009 signatures with viem, so verification, the hook, the
handler and settlement run in their real order. Adds exact-pinned,
test-only devDependencies and refreshes the registry digest.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The signer picks the EIP-3009 validBefore and verification does not cap
it at maxTimeoutSeconds, so a fixed 900 s TTL could drop the claim for
a still-valid authorization whose settlement failed, and a copy would
run the handler again. Expire claims at validBefore + 60 s (900 s
floor, one-year ceiling) with SET NX EXAT, using node-redis's current
option form. Also wrap messageBytes for createHash so the snippet
typechecks.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The claim timeout stops a request from waiting but does not cancel the
command, so a connected-but-silent Redis could accumulate abandoned SETs.
commandsQueueMaxLength bounds them; past the cap, claims reject at once
and the guard fails open. The test asserts the cap and counts unhandled
rejections in its summary.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Connect to Redis in the background with an error listener and the
offline queue disabled, so an unavailable store never blocks startup
or crashes the process; bound each claim with a 250 ms timeout.
- Include the asset in EVM claim keys (EIP-3009 nonces are per token).
- Cap the payment header at 16 KB before storing anything, and note that
the path needs the same rate limits as any unauthenticated write.
- State the TTL rule: longer than maxTimeoutSeconds plus the slowest
handler run.
- tests/ci/agent-payment-x402-seller-guard.test.js runs the guard block
from all three documents: concurrent copies, key equivalence (EVM
re-encoding, asset, Solana fee-payer slot), offline and hanging store,
oversized and missing headers.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
x402 middleware verifies, runs the handler, then settles. Verification
does not consume the authorization, so concurrent copies of one signed
payment each run the handler; only one settles. Document a claim-once
guard keyed on the EIP-3009 (from, nonce) or the SVM signed message,
with an atomic insert before the payment middleware, failing open.
Mirrored in ja-JP and zh-CN.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Line 13 still said 'Verify that 2.2.0 is readable' after the install
command was updated to @2.2.3. Align prose with the pin to remove the
version mismatch within the Quick Start section.
(cherry picked from commit b0b955541f)
The Quick Start section pinned ecc-universal@2.2.0 while every other
reference in the repo (README.md, and all other docs) uses @2.2.3.
This caused Antigravity users to install an outdated version.
Update the pin to @2.2.3 to match the rest of the codebase.
(cherry picked from commit a052b208e5)
* docs: correct MODULE_NOT_FOUND plugin cache path
Point the install command at cache/ecc/ecc/<version>.
The cache/ecc directory itself has no package.json.
* docs: explain the MODULE_NOT_FOUND version placeholder
Tell readers to replace <version> with the version from claude plugin list
before running the install command.
* docs: quote plugin cache version placeholder
---------
Co-authored-by: haelyra <49814733+haelyra@users.noreply.github.com>
The multi-backend, multi-frontend, multi-plan, multi-execute and multi-workflow commands were copied from ccg-workflow's command templates, which carry {{LITE_MODE_FLAG}} and {{GEMINI_MODEL_FLAG}} for that project's installer to substitute. ECC has no substitution step, so bash passed the literal token to codeagent-wrapper as a positional argument, the backend name landed in the working-directory slot, and every call exited 1. Remove the tokens from the five commands and the ja-JP, tr and zh-CN docs copies so the wrapper receives a plain --backend invocation. A regression test scans every multi-* command and translated copy for codeagent-wrapper lines that still contain a {{TEMPLATE}} token.
Fixes#3595
Snapshot the header and expected rows when the grader loads and pass
exportCsv copies, so an exporter that overwrites its input cannot change
what it is compared with. decoy-mutates now scores 0.75 with the other
two decoys; reference still scores 1.
- csv-export-delimiter's grader adds a fourth check: the data rows are
the exported values, with an optional header (the hidden intent says a
header is fine either way). Reference scores 1; both decoys 0.75.
- graderIsSound grades every decoy-* overlay and is sound only when each
scores below 1; --check-graders and the pre-billing check print the
decoy scores through formatGraderScores.
- isValidTrial and completedTrialKeys move to lib.js; coverage.js and
run-intent.js use them from there.
- run.js resumes with completedTrialKeys, so a provider-error or timed-out
key is retried, and writes one transcript per attempt
(<key>__<attemptId>.jsonl, recorded on the row) so a retry never
overwrites the failed attempt's record.
- armSummary computes trials, passes and means over valid rows and counts
the failed attempts apart as providerErrors.
Docs: question-effectiveness.md states the decoy rule and that a
csv-export-delimiter pass in the reported runs reflects the dialect only;
its Measures section and the harness README describe retries, per-attempt
transcripts and the hookless-trial stop.
Scoped adaptation of PR #2716: keep compact rendering as the default and require ECC_STATUSLINE_USAGE=1. Installer registration, managed aliases and the Codex background bar remain outside this slice.
Preserve full contributor head; refresh catalogs and Pi projection. Verify disposable Claude/Codex installs and resource discovery, with no automatic hooks or governance files.
Preserve full contributor history and current catalog. Actual process workflows cover concurrency, recovery, sprint planning and read-only status. Bound registry symlinks, counts and lock waits; preserve manually curated trigger provenance.
Reproduced issue #3485 on installed Codex CLI 0.162.0. Keep user legacy choices for explicit migration and verify disposable install, repair, reinstall and removal.
- questionIdsFor and condensedHintFor take an optional
{ externalContract: true }; without it a code change that handles data
asks data-schema only, and an unknown profile gets the original four
questions and condensed hint.
- The hook reads GATEGUARD_EXTERNAL_CONTRACT_QUESTION with the same
spellings as GATEGUARD_METRICS and passes it to the full denial, the
condensed denial and the metrics record, so all three agree.
- The effectiveness harness's arm patch forwards the option, so an arm
never drops it silently.
Docs: change-profile.md gains an External-contract question section and
qualifies "byte-identical to the fixed four questions"; design-notes.md,
SKILL.md (switch table, data rule, word-for-word set) and CHANGELOG say
the fifth question is opt-in; question-effectiveness.md and the harness
README note that the runner clears GATEGUARD_* variables, so a gate arm
from a current tree measures the gate without the question.
skill-triggers@1.json: registryDigest refreshed for the SKILL.md body
change; the description and triggers are unchanged.
- design-notes.md: new Type filters and Path patterns sections; Search
scope extends the search-of-the-target rule to name lookups; Flag
parsing lists the new value flags.
- change-profile.md: Unicode line terminators make an edit non-trivial.
- skills/gateguard/SKILL.md and CHANGELOG.md describe the same rules.
- skill-triggers@1.json: refresh registryDigest for the SKILL.md body
change. The skill's description is unchanged, so triggers and
triggersDigest are untouched, as in the plan-orchestrate refresh.