Repository navigation
fix(agents): ship the credential write-back in the image that is actually built - #285
Merged
Merged
Conversation
…ally built The watcher half of the write-back landed in docker/shared/watcher/index.js. Every agent Dockerfile copies base/watcher/index.js, and nothing anywhere references shared/ — so the feature has never been in an image. docker/shared/watcher is the old location: the live copy moved to base/ long ago and this one was left behind, three commits out of date, which is what made it look like the file to edit. The server side was complete and green the whole time — the route, the endpoint, the derived per-session key, its tests — and the app has been setting CREDENTIAL_SYNC_URL, CREDENTIAL_SYNC_KEY and CREDENTIAL_SYNC_PATHS into every agent container for something that was not there to read them. A suite cannot catch this: it passes on unreachable code. Port the block verbatim into base/watcher/index.js and delete docker/shared so the same mistake cannot be made twice. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Dec 2, 2026
…r (row 18) (#978) * docs(runners): record the §12.5 staging validation of the coder runner (row 18) (#285) Signed-off-by: Alex <[email protected]> * docs(runners): qualify row 18 result and state quota refusal not attempted Signed-off-by: Alex <[email protected]> --------- Signed-off-by: Alex <[email protected]> Co-authored-by: Alex <[email protected]>
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 is wrong
#279's Layer 2a — the watcher that reports a token the CLI rotated, so an OOM-killed pod no longer takes the rotation with it — has never been in an image.
The code went into
docker/shared/watcher/index.js. Every agent Dockerfile copies the other one:CREDENTIAL_SYNC_URLinshared/watcher/index.jsbase/watcher/index.jsshared/watcherindocker/,.github/,Makefileagent_base_strategy.rb:166-168, plusSESSION_IDat :126docker/shared/watcher/is the old location, last touched before #279 by82496d80; the live copy moved tobase/and this one stayed behind, three commits out of date, which is exactly what made it look like the file to edit.Everything server-side was complete and green throughout — route, endpoint, derived per-session key, integration test. That is the point: a suite passes on unreachable code. The app has been setting
CREDENTIAL_SYNC_URL,CREDENTIAL_SYNC_KEYandCREDENTIAL_SYNC_PATHSinto every agent container for a reader that was not there.What this does
Ports the block verbatim into
docker/base/watcher/index.js— configuration,startCredentialSync(), and the boot call — and deletesdocker/shared/so the same mistake cannot be made twice.The port is byte-identical to what #279 wrote;
diffagainstf87c75db:docker/shared/watcher/index.jsis empty for both the config block and the function.Verification
End-to-end, in a
node:24-alpinecontainer with the watcher's real dependencies, a real file watch and a receiving HTTP server — the path that was dead:The rotation is detected, debounced, posted once, and the header names are the ones
AgentCredentialSyncControllerreads (X-Session-Idat line 26,X-Agent-Keyat line 28) against the route atconfig/routes.rb:28.node --checkpasses on the modified watcher.No Ruby changed, so the backend suite is unaffected.
Note
This blocks the image publish.
main-imagesis 83 commits behinddevelop, so the next push to it republishes all seven images — worth landing this first, or that release ships the redaction filters from #283 while the write-back stays dead and looks shipped.🤖 Generated with Claude Code