Skip to content

Resolve fetch credential references on content.fetch (cannobserv v0.51.1, CannObserv/cannobserv#577) #216

Done

Description

@gregoryfoster

From the CannObserv/cannobserv#594 burn-down coordinator, relayed with the operator's consent. Source: https://github.com/CannObserv/cannobserv/issues/577#issuecomment-7068700156. Released in cannobserv v0.51.1 (2026-11-22, tag facdaebf).

cannobserv v0.51.1 (PATCH) adds fetch credential references to content.fetch (CannObserv/cannobserv#577). You go first; Watcher won't send one until you announce support.

What's on the wire.

  • ContentFetchCommand.credential_headers: dict[str, str] | None maps a header name to a reference named fetch-<role>, for example {"X-Api-Key": "fetch-wa-leg-api"}.
  • The value is never on the frame; you resolve it from host state.
  • The map is disjoint from headers (the issuer's Emit refuses an overlap). None and {} both mean no credential.
  • The canonical class decodes any map, so a malformed one reaches you to close.

What you owe (please carry these into docs/contracts/content-fetch-issuer-reference.md):

  • C1. Resolve on the host, and never echo the value. Keep it out of logs, facts, detail and crash dumps; detail names the header and the reference. Your AliasTable shape fits: a table frozen at boot, with a binding that points at host state (a file path), not key material.

  • C2. Scope the value per hop: only to hosts the binding names, only over https, on every hop including the first. Don't put the resolved value in FetchContent.headers. Measured on httpx 0.28.1 (AsyncFetchDriver, follow_redirects=True):

    • X-Api-Key is carried to a cross-origin redirect target.
    • Authorization survives an http→https upgrade.
    • Cookie is dropped on every hop, same-origin included.

    A transport beside egress.py's destination guard sees every hop. It can attach the credential where the hop is in scope, which also restores a dropped cookie. The design recommends that a binding list exact hostnames in PolicyHost's canonical form.

  • C3. Refuse, don't strip. A URL or redirect hop outside the binding's hosts, or not https, closes the command before that hop is sent.

  • C4. Guard the union. Your request-option guards (hop-by-hop, Host/Content-Length, CRLF, count and size) cover the names in both maps, and the size bound covers the resolved values. A failure is invalid_request_options, as today.

Two new FetchFailedEvent.reason tokens. Both are yours, since the vocabulary is producer-owned. cannobserv documents them in its registry; please add them to content-fetch-outcome-reference.md. Both are terminal=True, with status_code and attempts unset:

  • credential_unknown: no usable binding on this host for the reference. That covers one never provisioned, one dropped at load, or one off the rule.
  • credential_refused: the binding exists, but the URL or a redirect hop is out of scope (C3). This is destination_refused's shape.

Adoption. Your pin is co-core>=0.50.0,<0.51, so this crosses the 0.51.0 MINOR. CREDENTIALS_ALIAS_PATTERN keeps its exact text, so your ALIAS_NAME_PATTERN pin still holds. FETCH_CREDENTIAL_PATTERN and validate_fetch_credential are available for a credential table's load-time check.

Please announce support on CannObserv/cannobserv#577 and in your contract doc once a deployed worker resolves references. Watcher waits for that announcement, as it did for render (#63). Until then, a credentialed frame on an older worker is fetched without its credential, silently. That leaks nothing, but it has no effect.

Activity

  1. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Pre-flight brief (coordinator, epic #154, 2026-11-23)

    This is the next child. Watcher waits on our announcement before it sends a single credential_headers frame, and Archiver#376 waits behind Watcher. The issue body is the upstream ask; this comment is the brief. Measured against origin/main at c08b818 (live, deployed 2026-11-22 21:32Z) unless marked.

    It's a contract change, so a design doc comes first: docs/plans/2026-11-2X-216-fetch-credential-references-design.md, committed as #216 docs: add design doc for fetch credential references. Pause for the operator's approval before building. Upstream's design is cannobserv docs/plans/2026-11-21-577-fetch-credential-references-design.md (approved 2026-11-21; read it with GH_TOKEN_CANNOBSERV). Its §2 D3 and D4 are what we owe. Its §7 says it did not read our contract docs, so check its claims about them.

    Step 0: the co-core pin move rides here, as its own PR

    The operator's 2026-11-22 order had the pin move as a separate child before this one. Folding it in as #216's first PR is my call: the move is additive over our closure, and it's the first thing #216 needs.

    • Pin: co-core, co-core-aio, co-core-sync to >=0.51.1,<0.52. Lock with bash scripts/co-pypi.sh uv lock. The index's newest is 0.51.1 for all three [measured 2026-11-23, probed unbounded].
    • Closure diff, 0.50.0 → 0.51.1 (scripts/co_core_closure_diff.py, roots src and scripts) [measured]. 58 files each side, 8 not identical:
      • version-only: the three __init__.py. docstrings-only: pure/extract/__init__.py.
      • pure/models/changes.py: additive. ContentFetchCommand.credential_headers: dict[str, str] | None = None, the Emit's E1–E5 refusals, hide_input_in_errors on the Emit, and two registry docstring entries.
      • pure/util/aliases.py: additive. CREDENTIALS_ALIAS_PATTERN keeps its text, so ALIAS_NAME_PATTERN's pin (src/worker/aliases.py:74) still holds.
      • pure/extract/errors.py, extraction_defaults.py: include_description (#559). Nothing in src/ or scripts/ calls into co_core.pure.extract [traced, grep], so the new required keyword can't bite.
      • Requires-Dist: co-core-aio and co-core-sync now require co-core>=0.51.1,<0.52.
    • Behaviour after this PR alone: unchanged. The field decodes and nothing reads it. That's what today's worker does, since the class is extra="ignore". It may deploy before the design is approved. A runtime dependency moved, so deploy it (docs/DEPLOYMENT.md's release_set diff will show the three co-core packages).

    What the design has to decide

    These are recommendations, not decisions; the operator approves the doc.

    1. Where a binding lives. Copy AliasTable's shape (src/worker/aliases.py:85-136): REPLICATOR_FETCH_CREDENTIALS_FILE names a JSON table, unset means nothing is provisioned, it's read once at boot, frozen behind MappingProxyType, and a bad entry is dropped and logged, never raised. An entry is fetch-<role> → {"hosts": [...], "value_file": "/etc/replicator/..."}. hosts are exact names in co-core's PolicyHost form (changes.py _canonical_host: lower case, no trailing dot, punycode); reuse the function, don't copy it. value_file is a path, never the value, and _why_unusable's absolute-path rule applies. Load names with validate_fetch_credential. Decide whether the value is read at boot (rotation needs a restart) or at use.
    2. How the value is held. One holder whose repr and str never show it (pydantic's SecretStr or a slots class), so a traceback, a logger.exception or a crash dump can't print it (C1).
    3. The transport (C2, C3). One shared httpx.AsyncClient serves every command (src/worker/main.py:87-129, GuardedTransport(BodyCeilingTransport(...))). The per-command credential therefore has to reach the transport some other way than a constructor: a ContextVar set around fetcher.execute holds for every hop, since httpx follows redirects in the same task. co-core's AsyncFetchDriver builds the request itself, so request extensions aren't ours to set. Decide where the credential transport sits relative to the destination guard, and which refusal wins on a hop that is both out of scope and in a refused range.
    4. render="browser" with credentials. The canonical class decodes it (E1 is Emit-only). I recommend invalid_request_options, extending the existing "no header but user-agent under browser" rule (src/worker/handler.py:107-110, :542). It's the C4 union applied to the browser.
    5. The two tokens. Add CREDENTIAL_UNKNOWN and CREDENTIAL_REFUSED to FailureReason (src/core/errors.py:63). Both are terminal, with status_code and attempts unset, and detail names the header and the reference only.
    6. The charter. Run replicator-boundaries.md's three tests on the capability. Then mirror tests/test_boundaries.py §2b (:680-800, "the alias is a key, never a value") for credential_headers: the reference is a lookup key, and no payload field feeds a credential-shaped parameter. Change the charter and its tests together.

    Hazards [measured 2026-11-23, httpx 0.28.1, httpx.MockTransport]

    • Never mutate request.headers in place. _build_redirect_request copies the previous request's headers (Headers(request.headers)) into the next hop. A transport that sets X-Api-Key on the request it was handed sent it to a cross-origin redirect target in the probe: https://other.example/land received it. Hand the inner transport a copy, and test a cross-origin redirect with an in-scope first hop.
    • The shared client keeps a cookie jar across commands. In the probe, a Set-Cookie from one request was sent on a later, separate request to the same host. Today that means one command's fetch can change another's response, and the jar grows for the worker's whole life. With credentials, a session minted by a credentialed fetch would be replayed on later commands that carry no credential, outside C2's scope. The design must close this, for example with a jar that never stores. That also changes today's anonymous behaviour, so it's its own commit with its own test, and the doc says so. If you find something relies on today's jar, stop and say so on this issue.
    • C4's bounds cover the resolved values. MAX_REQUEST_HEADERS and MAX_REQUEST_HEADER_BYTES (handler.py:128-129) apply to both maps, with the bytes measured over the resolved values. MAX_HEADER_VALUE_LENGTH is about response headers and doesn't apply. A value that fails the bound is invalid_request_options, and its detail must not quote it.
    • Provisioning is a production write. The table and value files go under /etc/replicator (group replicator since Run replicator.service as a dedicated user, not exedev (#151 follow-up) #202), and the operator does it. Write the exact commands on this issue. A deploy with nothing provisioned is the safe state: every credentialed frame closes credential_unknown.

    Docs

    • docs/contracts/content-fetch-issuer-reference.md: C1–C4 under "Request options" (:30), and the announcement line once a deployed worker resolves references.
    • docs/contracts/content-fetch-outcome-reference.md: the two tokens.
    • docs/ENVIRONMENT.md: the new variable, next to REPLICATOR_REPLICATION_ALIASES_FILE (:69). Also docs/STREAMS.md and docs/ARCHITECTURE.md where the fetch path is described.

    How it ships (pr mode, since #208)

    • PRs with Refs #216, merged on GitHub with a merge commit: the pin move, the design doc, then the build. Every code PR here owes a deploy.
    • The announcement is cross-repo: a comment on CannObserv/cannobserv#577, posted only with the operator's consent, after a deployed worker has resolved a reference end to end (test bucket or a scratch binding). Draft it on this issue first.
    • Close this issue after the announcement.

    Done when

    • The suite matches the baseline (2074 passed, 2 skipped on c08b818, plus the new tests), ruff is clean, and CI is green by job on the final SHA and on main.
    • On the host: a credentialed command to an in-scope https host carries the header on every hop. An out-of-scope redirect closes credential_refused before that hop goes out. An unknown reference closes credential_unknown. No value appears in the journal (journalctl -u replicator.service grep for the test value: 0 hits).
    • The announcement is posted on CannObserv/cannobserv#577 with consent.
  2. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Pickup: the brief checked against origin/main c08b818 (2026-11-23)

    Most of the brief holds. Below: what I verified, the corrections, and what the brief leaves out. The design doc takes these as inputs.

    Verified as briefed

    • Step 0. The index's newest is 0.51.1 for all three [probed with the bound opened to <1]. co_core_closure_diff.py 0.50.0 0.51.1 reports 58/58 files with 8 not identical, matching the brief file for file. Per-step diffs place the changes: changes.py and aliases.py are 0.51.1's, extract/* is 0.51.0's (#559). CREDENTIALS_ALIAS_PATTERN == ALIAS_NAME_PATTERN [measured]. Nothing in src/, scripts/ or tests/ calls into co_core.pure.extract [grep]. The closure is the same with tests/ as a root. → #216 chore: move co-core 0.50 → 0.51 (0.51.1) #229 is open, CI is green on all four jobs, and it's waiting for the operator's merge.
    • Line references: aliases.py:85-136, main.py:87-129, handler.py:107-112/128-129/542, errors.py:63, content-fetch-issuer-reference.md:30 and ENVIRONMENT.md:69 all hold. §2b of test_boundaries.py runs 681-895, not 680-800.
    • The hazards [re-measured, httpx 0.28.1, MockTransport]:
      • A transport that sets X-Api-Key on the request it was handed sends it to a cross-origin redirect target.
      • The shared jar replays a Set-Cookie from one command on a later command to the same host.
    • The baseline is 2074 passed, 2 skipped, matched in a worktree.

    Corrections

    1. A jar that never stores breaks something that works today. A Set-Cookie on a 302 is sent back on the next hop of the same fetch [measured: /bounce sets sid=abc, and /land receives it]. Sites that do a cookie check, or hand out a session on redirect, depend on that, so a never-store jar can make a working fetch loop until TooManyRedirects, or land on an error page. What fits is a per-command jar: cookies live for one command's redirect chain and are then discarded. That closes the cross-command leak and the replay of a credentialed session while keeping the bounce. I found nothing that relies on the cross-command jar: src/ never touches cookies [grep]. Production's corpus can't be measured from here, so the design names that as the residual.
    2. There is a second way to deliver the credential besides a ContextVar. AsyncFetchDriver(client=...) per command, over a per-command httpx.AsyncClient that wraps the shared transport (the pool lives in AsyncHTTPTransport, not the client), gives a per-command jar (item 1) and lets the credential reach the transport through a constructor. The design compares the two.
    3. _canonical_host is private. The public route is TypeAdapter(PolicyHost) (changes.py:1898). And a hop's host must come from request.url.raw_host, not .host. .host is IDNA-decoded ('bücher.example.'), so it never equals a binding's punycode. Both keep the trailing dot [measured]. So the comparison is PolicyHost(raw_host.decode("ascii")) against the binding's canonical names.
    4. C4 misses E5 on the consume side. The canonical class decodes {"User-Agent": "fetch-x"}, and today's guards admit user-agent and the validators in headers, so guarding the union doesn't refuse them. Replicator has to refuse user-agent, if-none-match and if-modified-since as credential names explicitly (invalid_request_options). E3 (overlap with headers) and E4 (case duplicates) are caught by folding the union, as the brief says.

    What the brief leaves out

    • Several credential headers in one command can name bindings with different hosts. A hop must be in scope for every binding the command uses, or it's refused. That follows from C3's refuse-don't-strip rule.
    • Ports. PolicyHost has no port, so a host-only binding admits https on any port. The design has to decide this.
    • REPLICATOR_FETCH_CREDENTIALS_FILE trips test_every_credential_setting_is_scrubbed (its name matches credential). It joins PRODUCTION_ENV in tests/conftest.py. That's expected, not a blocker.
    • Host exposure. Chromium's parent process runs as replicator and can read anything group-readable under /etc/replicator, the same as today's writer keys. The renderer sandbox stays on. The value files get the keys' posture.

    Next: the design doc PR, and then a pause for the operator's approval.

  3. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Step 0 shipped. #229 merged as 012512a. Its push CI was green, and scripts/deploy.sh deployed it: live is 012512a4493a, and worker ready logged on that build. The release's package diff against c08b81882bdc is the three co-core packages, 0.50.0 → 0.51.1, and nothing else. The journal since the restart has no warning or error lines. Behaviour is unchanged: credential_headers decodes and nothing reads it. Next: the design doc (#230), which waits for the operator's approval.

  4. added a commit that references this issue on Nov 23, 2026
  5. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Step 1 done: the operator approved the design (#230) with all five recommendations as written — per-command cookie jar, values read at boot, a binding pins its header, port 443 only, credential_refused before destination_refused. Merged as c2b9dd5 (docs only; no deploy — the build's deploy brings live up to main).

    Next: the build on 216-fetch-credentials, in the commit order the doc lists.

  6. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Step 2, the build, is up as #231, and it owes a deploy. With nothing provisioned, the only change after deploying is cookie lifetime: cookies now last for one command's redirect chain. The commands below are for you to run after the deploy. Nothing here needs them to land first: an env variable the running code doesn't know is ignored.

    Provisioning a fetch credential on co-replicator (operator)

    Set the three names first. The example is cannobserv#577's; use the real binding Archiver will reference.

    REF=fetch-wa-leg-api          # the reference: fetch-<role>
    HEADER=X-Api-Key              # the one header the value may ride (call 3)
    HOST=api.leg.wa.gov           # exact host(s), punycode, no port, no wildcard

    1. The value directory, and one value file per binding. read -s keeps the value off the command line, out of shell history and off the screen. umask 027 makes the file 0640 from the moment it exists.

    sudo install -d -o root -g replicator -m 0750 /etc/replicator/fetch-credentials
    sudo bash -c 'umask 027; IFS= read -rs v; printf "%s\n" "$v" > "/etc/replicator/fetch-credentials/$1"; chgrp replicator "/etc/replicator/fetch-credentials/$1"' _ "$REF"
    # (paste the value, then Enter)
    sudo stat -c '%U:%G %a %s %n' /etc/replicator/fetch-credentials "/etc/replicator/fetch-credentials/$REF"
    # expect root:replicator 750 … and root:replicator 640 <len+1> …

    2. The table. Paths only, never a value.

    sudo tee /etc/replicator/fetch-credentials.json >/dev/null <<JSON
    {
      "$REF": {
        "header": "$HEADER",
        "hosts": ["$HOST"],
        "value_file": "/etc/replicator/fetch-credentials/$REF"
      }
    }
    JSON
    sudo chown root:replicator /etc/replicator/fetch-credentials.json
    sudo chmod 0640 /etc/replicator/fetch-credentials.json

    3. Point the service at it, and restart. Values are read at boot, so rotating a value later is also just a restart.

    sudo grep -q '^REPLICATOR_FETCH_CREDENTIALS_FILE=' /etc/replicator/.env \
      || echo 'REPLICATOR_FETCH_CREDENTIALS_FILE=/etc/replicator/fetch-credentials.json' | sudo tee -a /etc/replicator/.env
    sudo systemctl restart replicator

    4. Check it. The boot line names the reference, header, hosts and path. The last grep counts journal lines containing the value; it reads the value from its file, so you never type it. It should print 0.

    sudo journalctl -u replicator.service -b -o cat | grep -E 'fetch credentials loaded|unusable fetch credential|fetch credential table'
    sudo journalctl -u replicator.service -o cat | sudo grep -cF -f "/etc/replicator/fetch-credentials/$REF"

    A binding with a broken rule logs ignoring an unusable fetch credential binding with the rule, never the value; fix it and restart. Unset, or no file at that path, logs no fetch credential table on this host — fetch credentials are not provisioned.

    5. The optional live frame (design § Host steps) is yours, under Watcher's identity: seed_fetch.py --production --credential-header "$HEADER: $REF" --info-source-id <real id> <https://$HOST/...>. Then repeat the grep -c in step 4.

  7. added 12 commits that reference this issue on Nov 23, 2026
  8. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Step 3 shipped: #231 merged as 6718cc9 (merge commit, push CI green on all 4 jobs) and deployed. Live moved 012512a4493a → 6718cc94bade, and worker ready logged on it. The release's package set is identical, so only Replicator's own code changed. The boot logs no fetch credential table on this host — fetch credentials are not provisioned at INFO, with no warnings or errors.

    With nothing provisioned, the only live change is cookie lifetime: cookies now last for one command's redirect chain. Provisioning is yours, using the commands above.

    Next: the scratch end-to-end run on the released code (design § Host steps), then the cannobserv#577 announcement draft here.

  9. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Scratch end-to-end run on the released code: passed

    The design's verification step (§ Host steps). The released code (/srv/replicator/live, 6718cc94bade) ran as a scratch worker against a scratch redis-server, with a clean environment (env -i). The binding was a scratch one: fetch-e2e → X-Api-Key, hosts: ["httpbin.org"], with a dummy, non-secret value. Commands were seeded with the release's own seed_fetch.py --credential-header … --watch.

    Case Outcome
    A. In scope, same-host redirect (/redirect-to → /headers) blob_available. The echoed second hop carries X-Api-Key, so the transport re-attached it on a hop httpx built from the original request
    B. Redirect to example.com credential_refused, terminal: https://example.com/ is outside x-api-key (fetch-e2e)'s scope: example.com is not one of httpbin.org. Refused before the hop was sent
    C. Unknown reference fetch-nope credential_unknown: … names fetch-nope, which this host has not provisioned
    D. Referer: fetch-e2e (not the binding's header) credential_refused: … bound to the 'x-api-key' header only
    E. http:// first hop credential_refused: … is http, not https
    F. Anonymous /headers (control) blob_available, no X-Api-Key
    G. Cookie set on a 302 (/cookies/set?e2e=1), then a second command to /cookies first {"e2e": "1"} (kept across the redirect chain), second {} (not carried to the next command)

    Where the value appears: 0 times in the worker's log, content.blobs, content.fetch and the DLQ. It is in one stored blob, case A's, because httpbin echoes request headers. That is the reflection limit the issuer reference names, and the reason a binding should name only trusted hosts. The worker logged no errors. Its five warnings were the four refusals' dead-letter lines and the scratch blob directory's traversability notice. The scratch worker, keys, Redis and files are removed.

    Live production since the deploy: Watcher's first command on 6718cc94bade stored a blob, with nothing refused and no warnings.


    DRAFT, not posted: support announcement for cannobserv#577

    For the cohort's issuers (Watcher, Archiver) and the #594 coordinator. Not posted. It waits for the operator's consent. #577 is closed, so it goes on as a comment there. watcher#457 also waits on this announcement.

    Replicator resolves fetch credential references (replicator#216)

    Supported since Replicator 6718cc94bade, deployed 2026-11-23 (co-core 0.51.1). That completes step 2 of this issue's release order: Watcher may now carry credential_headers on content.fetch (watcher#457), and Archiver (#376) follows.

    A reference resolves only where an operator provisioned it. Nothing is provisioned on co-replicator today, so a command carrying credential_headers closes credential_unknown until the binding exists. Agree each fetch-<role> name with the Replicator operator before Archiver stores it.

    What a binding pins, which a command can't widen:

    • one header name. This goes beyond co-core. A reference named under any other header closes credential_refused, so the header Archiver stores must be the binding's;
    • exact hosts: no wildcard, no subdomain, compared in punycode;
    • https on port 443 only.

    Per hop, refused rather than stripped (C2, C3). Every redirect hop is checked against every credential on the command before it's sent. A hop out of scope closes the command credential_refused; it's never sent anonymously instead. This is the strict reading of this issue's open question 4. If Archiver#376's corpus redirects across hosts, the fix is to widen the binding's hosts, not to strip.

    Refusals, all terminal with status_code and attempts unset, and all before the request goes out:

    • invalid_request_options: a credential name headers would refuse; a name in both maps or twice by case (E3, E4); user-agent or a validator (E5); any credential under render="browser" (E1); the count or byte bound, with the resolved values counted;
    • credential_unknown: a reference off fetch-<role>, or one not provisioned;
    • credential_refused: the wrong header, or a URL or hop outside the binding.

    detail names the header and the reference, never the value, and an off-rule reference isn't quoted at all. A 401 or 403 when a credential was sent stays http_status.

    One change for every command: cookies now last for one command's redirect chain. A Set-Cookie no longer rides a later command to the same host.

    Reflection is the residual. An in-scope origin that echoes the header into its body puts the value in the stored blob, which blob_available announces cluster-wide. Bind only hosts trusted to keep it.

    Contract: content-fetch-issuer-reference.md § credential_headers. Verified end to end on the released code: replicator#216.

  10. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Done. Support is announced on cannobserv#577: https://github.com/CannObserv/cannobserv/issues/577#issuecomment-7112900946 (posted with the operator's consent). That unblocks CannObserv/watcher#457.

    Step Where
    co-core 0.51.1 pin #229, deployed 012512a4493a
    Design, operator-approved (all 5 calls as recommended) #230
    Build, CR rounds 1–2, four over-budget docs curated #231, deployed 6718cc94bade
    Scratch end-to-end on the released code above

    Still the operator's: provisioning a real binding, with the commands in this comment. Until then every credentialed command closes credential_unknown.

    Verification debt:

    • no live credentialed frame on content.fetch (this identity can't XADD there, broker#14). It comes when Watcher sends the first one against a provisioned binding;
    • production's reliance on the old cross-command cookie jar is unmeasured, though live fetches since the deploy are clean;
    • the deploy-test count (108 + 1) still differs from #211 Catch up co-core 0.48 → 0.50 (0.50.0) #213's 181, not investigated.

    Notes for later issues:

    • For cannobserv: co-core's exported FETCH_CREDENTIAL_PATTERN ends in $, so re.match or a JSON-schema pattern accepts "fetch-x\n". Archiver's save-time check (Fetch headers: per-host (Domain) and per-source policy, carried to content.fetch archiver#376) should call validate_fetch_credential, which uses fullmatch.
    • For this repo's curation cadence: the charter's enforcement table has no row for the alias scan (§2b), and two provenance headings (TESTING (#138), INFRASTRUCTURE (#148)) are still acknowledged rather than renamed.
  11. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    The cannobserv note from the closing comment is now filed: CannObserv/cannobserv#763 (all three exported *_PATTERN constants end in $; measured to accept a trailing newline under re.match, re.search and jsonschema 4.26.0, while co-core's functions and pydantic's pattern= refuse it).

    Same shape here, measured: src/worker/aliases.py:298 checks alias names with _ALIAS_NAME.match, which accepts gcs-x\n. It isn't reachable in practice: the name rule then requires the bucket to be exactly co-gcs-x\n, so it needs an operator to write a newline into both fields of the host table. Bus commands can't reach it. It's worth a fullmatch when cannobserv#763 settles the pattern text, since the pin at tests/worker/test_aliases.py:409 moves with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions