GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — secrets-broker: per-secret age, partial-refresh install, age/source exposure (#6767) by dezren39 · Pull Request #8491 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Refs #6767 — the issue stays open for the post-deploy canary verification named below; the code fix lands here.

Root cause

The broker's full-vault refresh was fail-whole (#5504): if any one secret's bws get failed, the entire refresh was discarded and the previous cache kept. One persistently failing fetch therefore blocked every rotation from landing, indefinitely — the 2026-11-06 incident, where the broker served the rotated turso.muse-mirror-rw-token's old value at +20s and still at +10 min. Cache hits were never re-checked, and GET /secret/<name> exposed no age/source, so a rotation runbook could not distinguish "the broker is stale" from "Bitwarden itself holds this value".

Change (secrets_broker.rs, per the issue's named design)

  • Per-secret age — cache entries are now {value, fetched_at_unix}.
  • Partial-refresh install — new install_refresh: successful fetches land with the refresh timestamp; a failed fetch keeps its secret's previous value and previous age (the fleet(secrets-broker): a partial vault refresh silently evicts cached secrets — one failed bws get becomes a 404 and a 'successful' refresh #5504 no-eviction rule, applied per secret instead of failing the whole refresh); names absent from the authoritative list are removed; a refresh in which every fetch fails installs nothing (source outage ≠ vault news). Partial installs are logged with the kept-failed count.
  • Age/source exposure — GET /secret/<name> now returns fetched_at_unix, age_seconds, and source (cache | bitwarden-read-through); GET /health adds oldest_secret_age_seconds. Response additions are backward-compatible for existing clients (fleet secrets get, queue broker) which read value only.

A rotation now lands within one TTL (default 900s) even while another secret's fetch is broken, and staleness is bounded and observable.

Tests

cargo test -p fleet-queue --lib --features secrets-broker: 59/59 pass, including 3 new tests:

  • install_refresh_lands_successes_keeps_failures_and_drops_delisted — the fleet(secrets-broker): serves stale secret value long after BWS rotation — read-through cache never invalidates #6767 oracle (rotate lands, failed fetch keeps old value+age, delisted removed);
  • install_refresh_with_zero_successes_keeps_the_whole_previous_cache;
  • secret_response_exposes_age_and_source.

Post-deploy verification (remaining, named on #6767)

With the rebuilt broker deployed: create a canary secret in BWS, read it through the broker, rotate it in BWS, and assert the broker serves the new value with a fresh fetched_at_unix within one TTL. The unit tests pin the mechanism; the canary run is the live proof.

🤖 repo-worker-code lane code-y, task 11460

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
repo-worker-code-k
secrets-broker: per-secret age, partial-refresh install, age/source e…
f899dd8
…xposure (#6767)

The full-vault refresh was fail-whole (#5504): one failed bws get
discarded the entire refresh, so a single broken fetch could block
every rotation in the vault indefinitely — the 2026-11-06 stale
turso token incident, where the broker served the old value at
+10min with no bound and no way to see the cached values age.

- Cache entries now carry fetched_at_unix (per-secret age).
- install_refresh installs per secret: successes land with the new
  timestamp; a failed fetch keeps the previous value AND age (the
  #5504 no-eviction rule, per secret); deletions follow the
  authoritative list; a zero-success refresh installs nothing.
- GET /secret/<name> exposes fetched_at_unix, age_seconds, source
  (cache | bitwarden-read-through); /health adds
  oldest_secret_age_seconds. A rotation now lands within one TTL,
  and a runbook can verify the broker against BWS by age.
- Tests: partial install oracle, zero-success keep-whole, and the
  age/source response shape. 59/59 lib tests pass with the
  secrets-broker feature.

Post-deploy verification (needs the rebuilt broker live): create a
canary secret in BWS, read it through the broker, rotate it, and
assert the new value + a fresh fetched_at_unix within one TTL.
@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 03:22
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a172abb7-c5a2-45c4-b066-9431187875e0
Commits

Reviewing files that changed from the base of the PR and between 69b339e and 7c9c2b5.

Files selected for processing: 1

  • pkgs/fleet/crates/fleet-queue/src/secrets_broker.rs
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T03:28:02.160704Z 7c9c2b5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 11, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f899dd8983

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/fleet/crates/fleet-queue/src/secrets_broker.rs
// EVERY fetch failed keeps the whole previous cache (the
// fail-whole tail this replaces let one broken fetch block every
// rotation in the vault indefinitely).
match install_refresh(state, &items, fetched, now_unix()) {

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 11, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve each successful fetch's actual timestamp

When one bws get is slow, earlier successful fetches wait for every worker to join and are then stamped with the refresh-completion time. A secret fetched before a rotation can consequently be served with fetched_at_unix after the rotation and age_seconds: 0, making a stale value appear freshly verified against Bitwarden. Capture a timestamp alongside each successful fetch and preserve it during installation rather than assigning the entire batch this completion timestamp.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 11, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7c9c2b5 — thank you, this was a real correctness hole in the age exposure itself. The worker pool now stamps each successful fetch with its own completion time ((value, now_unix()) at the fetch site), and install_refresh preserves the per-fetch timestamp instead of the batch install time. The install test oracle now pins exactly your scenario: alpha fetched at t=190 during a refresh installed at t=200 keeps fetched_at_unix: 190. Broker suite: 14/14 pass; full lib suite with the secrets-broker feature: 59/59.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
repo-worker-code-k
secrets-broker: preserve each fetch own timestamp on install (#6767, …
7c9c2b5
…Codex PR #8491)

The worker pool stamps each successful fetch with its own
completion time and install_refresh preserves it, so a value
fetched before a rotation can no longer claim a fetched_at_unix
after it. Test oracle strengthened: alpha fetched at 190 during a
refresh installed at 200 keeps 190.
@dezren39
dezren39 merged commit c676d1c into main Nov 11, 2026
1 of 7 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/11460-6767-secrets-broker-age branch November 11, 2026 03:26
This was referenced Nov 11, 2026
fleet(secrets-broker): serves stale secret value long after BWS rotation — read-through cache never invalidates #6767
Closed
Fleet CA, credentials & secrets — v0.3 design mill (Summit build-out) #9155
Open
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
secrets S1: one-call refresh + client bound (#13948) #14021
Merged
@dezren39 dezren39 added the audit:partial PR partially implemented; gap filed label Nov 24, 2026
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:partial PR partially implemented; gap filed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.