Skip to content

feat(wake): add amq wake retire for identity-safe inject-via stop - #256

Merged
avivsinai merged 1 commit into
mainfrom
feat/wake-retire
Jul 21, 2026
Merged

feat(wake): add amq wake retire for identity-safe inject-via stop#256
avivsinai merged 1 commit into
mainfrom
feat/wake-retire

Conversation

@avivsinai

Copy link
Copy Markdown
Owner

Summary

Wave 6 of #235 — reintroduces amq wake retire on the identity-safe primitives now in place (deferred out of #232 until the signal-safety work landed). Retires only an identity-confirmed live inject-via wake whose saved target exactly matches the expected --inject-via + ordered --inject-arg, using the W4 Linux-pidfd / W5b Darwin-cooperative stop — never bare-PID — or removes an exactly-bound proven-stale lock. Preserves the mailbox and saved target. Structured retired/refused/error output (JSON + text).

Boundary (documented in CLAUDE.md/README)

  • repair = replace a proven-stale inject-via wake
  • doctor --fix-wake-locks = remove a proven-stale lock
  • retire = stop an identity-confirmed live inject-via wake
  • launchd/systemd/shell owns raw-wake stop; retire refuses raw wakes, never unloads supervisors, and makes no promise against restart

Fail-closed refusals

Missing lock (absence unprovable), raw wake, unconfirmed identity, unverified/creating lock, missing saved target, and any injector path/argv mismatch all refuse. The stop path runs under the lifecycle guard for validation and releases it for the actual cooperative/pidfd stop.

Review

amq wake retire dispatch runtime-verified (runWakecase "retire"runWakeRetire; executes, not the generic loop — closing the exact gap #245's keepalive hit). Tests: Darwin cooperative retire + target preservation, Linux pidfd retire (CI-only), raw refusal, exact-target-mismatch refusal, proven-stale removal, missing-target refusal, JSON+text output. make ci (incl golangci-lint 0 issues) + all four GOOS builds green.

Part of #235. Implementation by Codex; design/review by Claude.

🤖 Generated with Claude Code

@avivsinai
avivsinai merged commit a57dba9 into main Jul 21, 2026
5 checks passed
@avivsinai
avivsinai deleted the feat/wake-retire branch July 21, 2026 13:36
avivsinai added a commit that referenced this pull request Jul 21, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.45.0](v0.44.0...v0.45.0)
(2026-07-21)


### Features

* **fsq:** fd-confined message delivery via os.Root capability
([#257](#257))
([059a076](059a076))
* **wake:** add amq wake retire for identity-safe inject-via stop
([#256](#256))
([a57dba9](a57dba9))
* **wake:** Darwin cooperative unix-socket shutdown for inject-via wakes
([#254](#254))
([6d66a20](6d66a20))


### Bug Fixes

* **delivery:** report indeterminate-durability commits +
capability-relative reads
([#261](#261))
([63cc42f](63cc42f))
* **wake:** close cooperative-stop duplicate-injection window and harden
Darwin lifecycle
([#260](#260))
([8d6e6f4](8d6e6f4))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

1 participant