docs(adapters/codex-recovery-proxy): say what the proxy does for source_host and quarantine - #46
Merged
Merged
Conversation
…ce_host and quarantine The README only said the bearer is forwarded unchanged. It did not say what that buys, so a reader could not tell whether provenance and quarantine still apply to writes that arrive through the proxy. They do, and the proxy has no part in it. mcp-server.mjs resolves the host from the Authorization header when a session is created (auth.mjs resolveHost, MNEME_HOST_TOKENS), stamps source_host on writes from that session, and routes hosts listed in MNEME_QUARANTINE_HOSTS into memories_quarantine. The proxy opens a fresh session per call with the same bearer every time, so the host is re-derived from the token on each call and the server behaves exactly as it would for a direct connection. Add a short "Provenance 与 quarantine" section that states only that, plus the parts an operator can trip over: - MNEME_TOKEN_CODEX has to be the token MNEME_HOST_TOKENS maps to the codex host. An unknown token is served under soft/off but recorded as the default host, and rejected with 401 under enforce. - A fresh session is also opened for tools/list, so resolve_quarantine only appears when that session's host is the primary host. No code change. The fault-injection test passes unchanged against this tree (fresh sessions=60, calls=59, live sessions=0; both hanging-remote scenarios surface an error inside the timeout window). Co-Authored-By: 千夏 <qianxia@clawgamers.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.
The adapter README said the bearer is forwarded unchanged, but not what that
means for provenance and quarantine, so a reader could not tell whether they
still apply to writes that arrive through the proxy.
They do, and the proxy has no part in it. The server resolves the host from
the Authorization header when a session is created (
auth.mjsresolveHost,MNEME_HOST_TOKENS), stampssource_hoston writes from that session, androutes hosts listed in
MNEME_QUARANTINE_HOSTSintomemories_quarantine.The proxy opens a fresh session per call with the same bearer, so the host is
re-derived from the token on every call and behaviour matches a direct
connection.
This adds a short "Provenance 与 quarantine" section stating only that, plus
the points an operator can trip over:
MNEME_TOKEN_CODEXmust be the tokenMNEME_HOST_TOKENSmaps to the codexhost. An unknown token is still served under
soft/offbut recorded as thedefault host, and rejected with 401 under
enforce.tools/listalso opens a fresh session, soresolve_quarantineis onlyregistered when that session's host is the primary host.
Documentation only; no code change. Every statement was checked against
auth.mjsandmcp-server.mjs. The adapter's fault-injection test passesunchanged (
node adapters/codex-recovery-proxy/proxy.test.mjs: 3/3 PASS).🤖 Generated with Claude Code