Repository navigation
Reset the Outpost project's Event Gateway side before every seed - #113
Merged
Merged
Conversation
OUTPOST_API_KEY is an ordinary project API key, so it also works on api.hookdeck.com and the CLI, and agents have created Event Gateway resources in the Outpost project with it. FixedProjectSource reset the gateway project, Outpost tenants, operator event destinations and managed config, but nothing on the Outpost project's gateway side. A source, two destinations, two connections and two issue triggers were left there on 24 and 25 August. In run 42044644850 an outpost-005 attempt on codex-gpt-5.4-mini-no-skills found the `hookdeck -> hookdeck-acme` connection, added a `$nin` body filter to it instead of changing the Outpost destination's topics, and attempts 2 and 3 of the same cell started from that edit. FixedProjectSource now deletes every gateway resource in the Outpost project on acquire, before the seed is applied, and again on release. The baseline (OUTPOST_GATEWAY_PRISTINE) is declared empty rather than captured: - An Outpost project is created without the gateway's default issue triggers, and no Outpost seed creates gateway resources, so pristine there is empty. - A captured snapshot would be taken from whatever the previous CI job left, because every job is a fresh checkout. It would have recorded the August leftovers as pristine and protected them. The reset is skipped when both keys are the same string. It is also skipped, with a warning, when the Outpost key can see any resource id in the gateway project's snapshot, because that means both keys reach one project and an empty baseline would delete its defaults. A failed reset fails the acquire, matching the gateway reset; on release it warns. Every deletion is logged, so a leftover shows up in the job log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit resets the Event Gateway side of the project OUTPOST_API_KEY belongs to on every acquire, for every scenario, not only Outpost ones, and deletes resources that existed before the run. README.md and .env.example still said Outpost state was not reset and that Event Gateway scenarios do not touch the Outpost project. Both now say the key must belong to a dedicated Outpost project and that its Event Gateway side is wiped on every run. Deletions are now logged as each one happens. They were logged once after the reset returned, so a reset that failed partway lost the record of what it had already deleted. AGENTS.md: the Outpost trap's heading contradicted its own paragraph and now says tenants are only reset on release. The filter is described as a body `$nin` filter, the long line is rewrapped, and the paragraph says a gateway API error on the Outpost key now fails the acquire of every cell. README.md no longer says a new project ships with four default issue triggers. Platform project creation makes four, but review found three on the gateway project today, so the count is dropped rather than asserted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
OUTPOST_API_KEYis an ordinary project API key, so it works onapi.hookdeck.comand the Hookdeck CLI as well as the Outpost subdomain. Agents have used it to create Event Gateway resources inside the Outpost project, andFixedProjectSourcenever reset that side: it reset the gateway project, Outpost tenants, operator event destinations and managed config, and nothing else.A source, two destinations, two connections and two issue triggers were left there on 24 and 25 August. In release matrix run 42044644850,
outpost-005oncodex-gpt-5.4-mini-no-skillsfound thehookdeck -> hookdeck-acmeconnection, added a body$ninfilter to it instead of changing the Outpost destination's topics, and attempts 2 and 3 of that cell started from the edit.codex-gpt-5.6-no-skillsalso found the connection inoutpost-002.All seven were deleted by hand on 6 November, after their full configurations were saved, so the project's gateway side is empty now. This change keeps it empty from now on.
What changed
FixedProjectSourcedeletes every Event Gateway resource in the projectOUTPOST_API_KEYbelongs to on everyacquire(), for every scenario, not only Outpost ones, and again onrelease().acquire()runs immediately before the seed, so a run that dies before release cannot leak into the next one, which in CI is a different job. Resources that existed before the run are deleted too.OUTPOST_API_KEYmust belong to a dedicated Outpost project. README.md and.env.examplenow say so; both previously said the Outpost project was not reset and that Event Gateway scenarios do not touch it.OUTPOST_GATEWAY_PRISTINE, is declared empty rather than captured. An Outpost project is created without the gateway's default issue triggers (checked in the platform's project creation, not inferred from the API), and no Outpost seed creates gateway resources. A captured snapshot would not work in CI: every job is a fresh checkout, so it would be taken from whatever the last job left, and it would have recorded the August leftovers as pristine.Verification
pnpm install,pnpm -r build,pnpm typecheck: passpnpm check: all suites pass;@hookdeck-evals/hookdeck55/55, ten of them newpnpm format:check(biome and prettier): passNot done, and not checked
HookdeckClient.listdoes not passdisabled=true. The OpenAPI definition supports that parameter only on connections, sources and destinations, and adding it would also make the gateway reset delete disabled resources missing from an existing local snapshot, so it is left for a separate change. The Outpost project has no disabled resources today.Closes #111
🤖 Generated with Claude Code