Skip to content

chore(elidex-review): axes.md Axis 3 docstring-contract↔body entry#277

Merged
send merged 1 commit into
mainfrom
chore/elidex-review-axes-docstring-contract
Jun 3, 2026
Merged

chore(elidex-review): axes.md Axis 3 docstring-contract↔body entry#277
send merged 1 commit into
mainfrom
chore/elidex-review-axes-docstring-contract

Conversation

@send

@send send commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Calibrates /elidex-review Axis 3 (Pragmatic shortcut) to catch a self-inconsistency class the pre-push gate missed on PR #275:

  • Result-returning host natives (esp. promise-returning *_outcome family) whose body swallows a backend/IO Result via unwrap_or / unwrap_or_default / .ok().flatten()
  • … while the file/fn docstring or a sibling op (open/put) states a "failure → reject/propagate" contract.

→ silent-wrong-on-error + docstring↔body self-inconsistency. Required action: honor the contract with ?-propagate + map_err.

Origin

PR #275 (Cache API) Copilot R1 surfaced 8 IMP error-swallow findings in cache read-side natives where the body violated the file docstring's own "every sync failure → rejected Promise" contract — sibling open/put honored it with ?+map_err(TypeError). The pre-push /elidex-review did not flag the self-inconsistency.

Placement (MECE)

Axis 3, not Axis 4. Axis 4 is citation-accuracy only (§-number↔title); here the docstring contract was correct and the body violated it (a pragmatic error-swallow). So the MECE home is Axis 3. Adds one ### Detect rule + one ## MECE 整理ルール ownership line.

Scope

Skill-only diff (.claude/skills/elidex-review/axes.md, +2 lines). No Rust paths touched — CI paths-filter skips the Rust jobs.

🤖 Generated with Claude Code

Add a calibration entry so /elidex-review Axis 3 (Pragmatic shortcut)
catches docstring-contract ↔ body inconsistency: `Result`-returning host
natives (esp. promise-returning `*_outcome` family) whose body swallows a
backend/IO `Result` via `unwrap_or`/`unwrap_or_default`/`.ok().flatten()`
while the file/fn docstring or a sibling op (`open`/`put`) states a
"failure → reject/propagate" contract → silent-wrong-on-error + self-
inconsistency.

Origin: PR #275 (Cache API) Copilot R1 — 8 IMP error-swallow findings the
pre-push /elidex-review did not catch. MECE home is Axis 3 (the docstring
contract was correct; the body violated it = pragmatic error-swallow), not
Axis 4 (citation-accuracy only). Adds the Detect rule + a MECE ownership
line. Skill-only diff; no Rust paths touched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 3, 2026 15:05

Copilot AI 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.

Pull request overview

Updates the /elidex-review skill’s Axis 3 (Pragmatic shortcut) guidance to explicitly flag docstring/contract violations where Result-returning (especially promise-returning *_outcome) host natives swallow backend/IO failures instead of rejecting/propagating as documented.

Changes:

  • Adds a MECE ownership rule assigning “docstring-stated contract ↔ body violation” findings exclusively to Axis 3.
  • Adds an Axis 3 [diff] Detect entry describing the “Result swallow despite reject/propagate contract” pattern and the required remediation (? + map_err).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@send send merged commit df93e82 into main Jun 3, 2026
5 checks passed
@send send deleted the chore/elidex-review-axes-docstring-contract branch June 3, 2026 15:27
send added a commit that referenced this pull request Jun 3, 2026
…spatch flag

Copilot flagged (2 IMPORTANT, one shared root): `FetchEvent.respondWith` and
`ExtendableEvent.waitUntil` did not gate on the event's dispatch flag, so a late
call from a timer/network callback during the pump (after the SW loop snapshotted
the side-store) silently mutated state instead of throwing the spec-mandated
`InvalidStateError`.

One structural fix — read the shared `dispatched_events` §2.9 dispatch-window
bracket (set/cleared by `dispatch_event_at_sw_scope`) in both natives:

- `respondWith` → SW §4.6.7 step 2 (dispatch-flag), ordered before the existing
  step-3 respond-with-entered (`responded`) guard. This also makes the impl
  finally honor its own docstring ("any call after dispatch settled ... throws
  InvalidStateError" — the #277 docstring-contract<->body axis).
- `waitUntil` → the dispatch-flag half of the spec's "active" predicate (§4.4.1);
  the pending-promises (lifetime-extension chaining) half stays in the deferred
  `#11-sw-fetchevent-waituntil` slot, so a late call throws rather than silently
  dropping.

Regression test `wait_until_after_dispatch_throws_invalid_state` drives the gate
via a `setTimeout` callback — the genuine post-dispatch window (a microtask
`.then` instead runs inside `dispatch_script_event`'s trailing checkpoint, flag
still set, and is correctly accepted).

Gate: clippy + doc + nextest (10744/10744) green; fix-delta /elidex-review
(5-axis) 0C/0I/0M/6FP — both new spec citations webref-verified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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