Repository navigation
Description
Update 2026-11-26 (infra move): the valkey-roadmap manifest goes to dan-petty/homelab (follow-up of #4563).
This item keeps the product code. The router ACL lines are a homelab change, made when this item is built. devops ci --check --only k8s here cannot check them. Record the 2 MB memory plan line with the manifest.
Problem or Motivation
The read API of the roadmap Service must answer from valkey-roadmap with no GitHub request, and both router replicas must give the same answer. Today the open items exist only in GitHub and in the transient listing of the status lane. No store holds a read model of the items.
Proposed Solution & Architectural Design
Keys from RepoRef in valkey-roadmap:
| Key | Type | Writer | Bound |
|---|---|---|---|
roadmap:v1:item:<owner>/<name>:<n> |
hash (fields, record marks, updated_at) |
the issue listing; the router on issues deliveries |
TTL 1 day, set again at each listing |
roadmap:v1:items:<owner>/<name> |
set of open numbers | the issue listing: write a temporary key, then RENAME |
owner: the listing |
- The code that lists the open issues already (the status lane now; the sweep later) writes the read model at no extra request cost. The writer function moves with the listing to the sweep; no route changes.
issuesdeliveries update the item from the payload. Theissuespayload model declareslabel.nameand keepsextra="ignore"(ADR 0009).- A Valkey error is one log line, and the round goes on.
- ACL: the
routeruser reads these keys and the state keys that/healthand/budgetsreport, and writesitem:*anditems:*. - Size: about 2 MB for 7 repositories. Add it to the memory plan of
valkey-roadmap.
Target Subsystem
Workstation Caching & Valkey (roadmap Service read model).
Existing Tool Considered
Valkey hashes, sets and RENAME through valkey-py. A process-memory reader is rejected: the router runs 2 replicas at the end of the move. valkey-runs is rejected: any source can reach its NodePort. Cost: about 300,000 tokens and 4 hours to build, about 10,000 tokens a month to keep, about 50,000 tokens to fix.
Acceptance Criteria
- The issue listing writes each open item to the keys above with no extra GitHub request (a test counts requests).
- An
issuesdelivery updates the item hash from the payload. - The set of open numbers is replaced with
RENAME; each item hash has a TTL of 1 day. - A Valkey error is one log line, and the round goes on.
- All keys come from
RepoRef; therouterACL user gets the access above.
Dependencies
- "docs(service): decide the roadmap Service read API".
- "feat(roadmap): name each repository's resources from one RepoRef".
- "feat(service): share the GitHub budget and holds in Valkey".
Source: #4517
Alternatives check of 2026-11-28: in-use.
The repository already uses this tool.
Tool: valkey-io/valkey-py (https://github.com/valkey-io/valkey-py), MIT, last activity 2026-11-20, maintained.
Reason: Searches found no tool that keeps a Valkey read model of issues; valkey-py is the client that already gives the hash, set, expire and rename commands, but the key schema, writers, ACL and memory plan stay project code.
Covers:
- HSET, SADD, EXPIRE and RENAME under their raw command names
- TTL set again on each write of an item hash
- Pipelines, connection pools and ACL user authentication
Lacks:
- Read-model key schema from RepoRef
- Writer in the open-item listing and the issues delivery path
- router ACL line and the 2 MB memory plan line
Proposed design
Problem statement
The read API of the roadmap Service must answer from valkey-roadmap with no GitHub request, and both router replicas must give the same answer. No store holds a read model of the items today: the open items exist only in GitHub and in the transient listing of the status lane. This change writes each open item to valkey-roadmap from the listing that already reads it, updates one item from each issues delivery, and adds the keys, the 1-day TTL, the atomic swap of the open set, the error handling, the router ACL line and the 2 MB memory plan line of the instance.
Acceptance criteria
Requirement: Listing writes the read model
The open-item listing SHALL write each open item to its item hash and write the set of open numbers from the items that it already reads.
Scenario: No extra GitHub request
- WHEN The stage round lists the open items and Valkey accepts the writes.
- THEN A test counts no GitHub request beyond the listing's own, and each item hash and the set hold the listed items.
Requirement: Webhook updates one item
The router MUST update the item hash of an issues delivery from the payload, with no GitHub request.
Scenario: A label delivery updates the hash
- WHEN A signed
issuesdelivery with actionlabeledarrives for an open item. - THEN The item hash holds the label of
label.name, the state, the title and theupdated_atof the payload, and a test counts no GitHub request.
Requirement: Atomic swap of the open set
The listing MUST replace the set of open numbers with RENAME from a temporary key.
Scenario: A reader never sees a partial set
- WHEN A listing round writes a temporary set and renames it over the set of open numbers.
- THEN The set holds exactly the open numbers, no temporary key remains, and the writer sends no
DELof the set.
Requirement: Item hash expiry
Each write of an item hash MUST set a TTL of 1 day on it again.
Scenario: TTL is set again
- WHEN A listing round and an
issuesdelivery write the same item hash 10 minutes apart. - THEN The item hash holds a TTL of 86400 seconds after each write.
Requirement: Valkey error does not stop the round
A Valkey error MUST write one log line and MUST NOT stop the listing round or the delivery.
Scenario: Connection error during the write
- WHEN The Valkey client raises a connection error during the write of a listing round.
- THEN The test finds one log line for the error, and the round returns its usual result.
Requirement: Keys come from RepoRef
Each read-model key SHALL come from RepoRef, and no code SHALL parse owner/name itself.
Scenario: Item key of one repository
- WHEN The writer builds the keys for
dan-petty/devops-cliand item 4582. - THEN The keys are
roadmap:v1:item:dan-petty/devops-cli:4582androadmap:v1:items:dan-petty/devops-cli.
Requirement: Router ACL
The router ACL user SHALL read the read-model and state keys and SHALL write the item and set keys with +hset, +sadd, +expire and +rename.
Scenario: The ACL plan renders the router user
- WHEN
uv run devops ci test tests/k8s/test_cluster_secret_plan.pyruns on the change that adds therouteruser toROADMAP_STATE_VALKEY_ACL_TEMPLATE. - THEN The test passes and the aclfile holds a
routerline with~roadmap:v1:item:*,~roadmap:v1:items:*,+hset,+sadd,+expireand+rename.
Requirement: Memory plan states the read model
The memory plan of valkey-roadmap MUST state the read model and its bound of 2 MB for 7 repositories.
Scenario: The k8s row renders the valkey-roadmap manifest
- WHEN
uv run devops ci --check --only k8sruns on the change that adds the read-model line tok8s/devops/valkey-roadmap/valkey.conf. - THEN The row passes and reports no error for the
valkey-roadmapmanifest.
Requirement: Pending a person after the merge
After the merge, a person SHALL push the router password and the aclfile to devops/valkey-roadmap-auth, restart deployment/valkey-roadmap, and prove that the live router user writes and reads an item key.
Scenario: The live router user writes the read model
- WHEN After the merge a person runs
uv run devops k8s push-secrets --only devops/valkey-roadmap-auth, restartsdeployment/valkey-roadmapanddeployment/roadmap-service, and runskubectl -n devops exec deploy/valkey-roadmap -c valkey -- valkey-cli --user router --pass <router-password> HSET roadmap:v1:item:dan-petty/devops-cli:4582 title test. - THEN The push reports the new
routerkey and the aclfile, the pod is ready, and theHSETanswers1;HGETasrouteranswerstest.
Existing Tool Considered
valkey-io/valkey-py (https://github.com/valkey-io/valkey-py, MIT, maintained) is the open client that the alternatives check of 2026-11-23 records in-use; its block names what it lacks for this item. The change builds that product code, at about 300,000 tokens and 4 hours to build, about 10,000 tokens a month to keep, and about 50,000 tokens to fix.
Key questions
- Does this item change the
valkey-roadmapmanifest, its ACL or its memory plan?: Yes. Thevalkey-roadmapproduct base is in this repository atk8s/devops/valkey-roadmap/(ADR 0032 section 1,k8s/README.md:26,docs/CLUSTER.md:294). Therouterline is a change ofROADMAP_STATE_VALKEY_ACL_TEMPLATEinsrc/devops_cli/k8s/cluster_secrets.py:81, and the 2 MB line goes with the manifest ink8s/devops/valkey-roadmap/valkey.conf:11and thevalkey-roadmapsection ofk8s/README.md:24. The body note of 2026-11-26 that the manifest goes to homelab is not the state at this commit: feat(k8s): add the valkey-roadmap instance, its setting and ACL users #7302 delivered the instance here on 2026-11-26 (CHANGELOG.md:38), anddocs/CLUSTER.md:294names this folder.uv run devops ci --check --only k8sbuilds the folder; the ACL test istests/k8s/test_cluster_secret_plan.py:709. [sources: docs/adr/0032-infrastructure-templates-live-in-four-homes.md:38, k8s/README.md:26, docs/CLUSTER.md:294, src/devops_cli/k8s/cluster_secrets.py:81, k8s/devops/valkey-roadmap/valkey.conf:11, CHANGELOG.md:38, tests/k8s/test_cluster_secret_plan.py:709] - Do the read-model key names come from
RepoRef?: Yes. ADR 0022 gives one rule for each key that holds a repository, andARCHITECTURE.md:227repeats it: no code parsesowner/nameitself.RepoRef.valkey_keyatsrc/devops_cli/github/repo_ref.py:203buildsroadmap:v1:<kind>:<owner>/<name>[:<id>], sovalkey_key("item", "4582")givesroadmap:v1:item:dan-petty/devops-cli:4582andvalkey_key("items")givesroadmap:v1:items:dan-petty/devops-cli. (best practice) [sources: docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md, ARCHITECTURE.md:227, src/devops_cli/github/repo_ref.py:203]- Chosen: Use
RepoRef. ADR 0022 requires one reference for each key that holds a repository. - Rejected: Format
owner/namein the writer. ADR 0022 forbids code outsideRepoReffrom parsingowner/name. - Rejected: Read key names from settings. Settings hold repository names, not key names, and ADR 0022 gives the key rule.
- Chosen: Use
- Where does the writer live, and which code gives it the open items?: The writer joins
src/devops_cli/roadmap/stores/listing_shared.py, the shared listing store that already writes the listing through HSET, EXPIRE and RENAME (listing_shared.py:489-532). The change adds the set write and theroadmap_state_tier()for the read-model keys (src/devops_cli/valkey/cache.py:398). The stage row_open_itemsatsrc/devops_cli/roadmap/stage/stage.py:586gives it the open items of the listing that the round already reads, so the round sends no extra GitHub request. The writer moves with that listing to the sweep. (best practice) [sources: src/devops_cli/roadmap/stores/listing_shared.py:489, src/devops_cli/roadmap/stores/listing_shared.py:531, tests/roadmap/stores/test_listing_shared.py, src/devops_cli/roadmap/stage/stage.py:586, src/devops_cli/valkey/cache.py:398, src/devops_cli/roadmap/run.py]- Chosen: Extend
src/devops_cli/roadmap/stores/listing_shared.py. The store already writes the listing through HSET, EXPIRE and RENAME and has tests, so one module holds the writer and moves to the sweep. - Rejected: A new module
src/devops_cli/roadmap/stores/item_read_model.py. It adds a second writer of the same listing and a second place to move to the sweep. - Rejected: Inline in the stage row. The webhook route cannot reuse it, and the stage row would hold the Valkey detail.
- Chosen: Extend
- How does the listing replace the set of open numbers?: Write the open numbers to a temporary key and
RENAMEthat key over the set of open numbers.src/devops_cli/valkey/client.py:348sendsRENAME, andlisting_shared.py:531already uses that command for the snapshot swap. ADR 0023 records the same swap for a rebuild. (best practice) [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md, src/devops_cli/roadmap/stores/listing_shared.py:531, src/devops_cli/valkey/client.py:348]- Chosen:
RENAMEof a temporary key. The swap is one atomic command, so a reader sees the old set or the new set and never a partial one. - Rejected:
DELthenSADD. A reader between the two commands sees an empty set, and the read API answers with no open item. - Rejected:
SREMof each closed number. The code reads the set and computes the difference, and a reader sees a mixed set for the length of the round.
- Chosen:
- What TTL does an item hash get?: 1 day, set again at each listing round and after each delivery. ADR 0021 section 3 rule 6 requires a TTL or one owner for each key (
docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:83). The sweep runs every 5 minutes (CONTEXT.md:157), so the TTL never expires a live item; the item hashes of a repository that leavesservice.reposfree their memory within 1 day, and the set key has the listing as its one owner, which deletes it. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:83, docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md, CONTEXT.md:157, src/devops_cli/roadmap/stores/listing_shared.py]- Chosen: 1 day, set again at each round and after each delivery. The sweep refreshes each live item every 5 minutes, and the item hashes of a removed repository free their memory within 1 day.
- Rejected: No TTL. The item hashes of a removed repository stay until a person deletes them, and nothing reports them.
- Rejected: 7 days. The memory of a removed repository stays 7 times longer, and the listing already refreshes the key.
- What does the writer do when Valkey returns an error?: Write one log line at warning level and continue the round or the delivery. GitHub stays the source of truth (
ARCHITECTURE.md:225) and the read model is derived data (ADR 0021 section 3 rule 1), so a Valkey error must not delay a label, a comment or a webhook. (best practice) [sources: ARCHITECTURE.md:225, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, docs/guidelines/agentic-jobs.md]- Chosen: One log line, then continue. GitHub stays the source of truth, and one line keeps the log quiet during an outage.
- Rejected: Abort the round. A Valkey outage then stops roadmap work that GitHub can still do, and the status lane loses its round.
- Rejected: Retry with backoff in the round. The round holds its lane for the backoff, and the next round writes the same keys.
- Which fields does an
issuesdelivery write into the item hash?: The fields that the read API answers, the record marks andupdated_at, taken from the payload.WebhookIssuealready declareslabelsofWebhookLabel.name,state,titleandupdated_at, withextra="ignore"(src/devops_cli/models/webhooks.py:29,src/devops_cli/models/webhooks.py:70), so this item changes no payload model. ADR 0009 requiresextra="ignore", so an unknown field never fails a delivery. (best practice) [sources: docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md, src/devops_cli/models/webhooks.py:29, src/devops_cli/models/webhooks.py:70, docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md]- Chosen: The read-API fields, the record marks and
updated_at. The hash holds only fields that a reader uses, andextra="ignore"keeps the delivery safe when GitHub adds a field. - Rejected: The whole payload as JSON. The read API parses JSON for each answer, and the hash grows past the 2 MB bound.
- Rejected: Only the number and the title. The answer would miss the state, the labels and
updated_at, and the read API would need GitHub again.
- Chosen: The read-API fields, the record marks and
- Which user writes the read model, and what may it read?: The
routeruser writes the item and set keys, and reads the read-model keys and the state keys that/healthand/budgetsreport. ADR 0021 section 3 names therouter,sweepandagentusers (docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:76); feat(service): share the GitHub budget and holds in Valkey #4563 adds therouterandsweepusers (docs/CLUSTER.md:300), and this item adds the read-model key patterns torouter. The Service pod's existingbrainuser keeps the brain index (docs/CLUSTER.md:301). The ACL template isROADMAP_STATE_VALKEY_ACL_TEMPLATEatsrc/devops_cli/k8s/cluster_secrets.py:81. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:76, docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md, docs/CLUSTER.md:300, docs/CLUSTER.md:301, src/devops_cli/k8s/cluster_secrets.py:81]- Chosen: The
routeruser. The issue names it for the read model, and ADR 0021 section 3 gives the instance arouteruser. - Rejected: A new read-only
readeruser. The router writes the item from each delivery, so a read-only user needs a second write user and a second credential. - Rejected: The
defaultuser. It holds all commands, so a defect in the router could write any key of the instance.
- Chosen: The
- Which file holds the memory plan of
valkey-roadmap?: Thevalkey-roadmapproduct base isk8s/devops/valkey-roadmap/(ADR 0032 section 1,k8s/README.md:26,docs/CLUSTER.md:294).k8s/devops/valkey-roadmap/valkey.conf:11holdsmaxmemory 128mband the basis of the bound; thevalkey-roadmapsection ofk8s/README.md:24states the bound of 128 MiB. The 2 MB read-model line goes invalkey.confwith the manifest, and the section repeats it. [sources: docs/adr/0032-infrastructure-templates-live-in-four-homes.md:38, k8s/README.md:24, docs/CLUSTER.md:294, k8s/devops/valkey-roadmap/valkey.conf:11] - Which items does this item depend on?: Only feat(service): share the GitHub budget and holds in Valkey #4563 is open. feat(service): share the GitHub budget and holds in Valkey #4563 adds the
routerandsweepusers and the coordination keys that the read model's ACL and state keys need (docs/CLUSTER.md:296,docs/CLUSTER.md:300). docs(service): decide the roadmap Service read API #4581 is delivered: ADR 0029 is accepted and records the read API fields (docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:1). feat(roadmap): name each repository's resources from one RepoRef #4533 is delivered: ADR 0022 is accepted andRepoRefis insrc/devops_cli/github/repo_ref.py(docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:1,src/devops_cli/github/repo_ref.py:102). [sources: docs/CLUSTER.md:296, docs/CLUSTER.md:300, docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:1, docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:1, src/devops_cli/github/repo_ref.py:102]
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(service)scope of the title gives the scope.It is a required piece of the service read API but has unmet dependencies and no failure or advisory driving it.It lets the read API answer from Valkey with no GitHub request, which is a core service requirement.The body estimates about 4 hours to build with clear acceptance criteria and defined keys.Both deal with reading and writing roadmap items, but #768 unifies the GitHub read/write interface while this candidate adds a Valkey-backed read model for the service read API.devops-cli-service commentedon Nov 13, 2026
Alternatives check: in-use
Reason: The searches found valkey-py, the maintained Python Valkey client that the issue already names, and it supplies every Valkey command the design needs (hashes, sets, expiry/TTL, RENAME, pipelines). It is only a client, though: the read model itself, its writer in the issue listing, the webhook update and the ACL wiring still have to be built, so it covers only the storage half of the need.
The repository already uses this tool.
Tool: valkey-io/valkey-py (https://github.com/valkey-io/valkey-py)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-13. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 14, 2026
Refine cannot set this item to Ready at b15faab while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 26, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.