Repository navigation
fix(truapi): stop registering product statement allowances for background renewal - #1490
Draft
todortodorovic wants to merge 1 commit into
Draft
todortodorovic wants to merge 1 commit into
todortodorovic wants to merge 1 commit into
Conversation
…ound renewal The renewal ledger refuses every product grant by design (d956dda), but the merge in 9b8b339 kept the jam branch's tracking call in the SSO responder, so each product statement allocation logged a failed attempt to record a renewal target. Drop the call; product grants stay provisioned on demand.
Contributor
Bundle size reportCompared with
WebAssembly modules
Changed files (37)
Commit: 6f06115 |
Contributor
|
CI Status: not green, 3 items need attention.
All job results
Signing credentials: failure as of 2026-10-16, a release may fail Commit |
This branch has not been deployed
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.
Problem
On this branch,
allocate_statement_store_allowanceinsigning_host/sso_responder.rsasks the renewal ledger to keep every productstatement-store allowance it issues. It calls
allowance_renewal::trackwithStatementRenewalTarget::ProductStatementAllowance.The ledger refuses every product grant.
track_targetsinallowance_renewal/driver.rsreturns an error wheneveris_product_grantholds, because product allowance decisions live in artifact-scoped product
storage that background renewal cannot read. Product allowances are provisioned
on demand by an authorized request and are never renewed in the background.
So the call can only fail. It runs after the allowance has been issued, and it
logs:
The allocation still succeeds, so nothing breaks, but the warning reads like a
renewal failure to anyone watching a signing host's log. A
truapi-hostCLIsigning host built from
epoca/truapi-024(05f5c8c) logs it when a productrequests its statement-store allowance.
feat/chat-v2-product-authoritydropped this call in 172afb2. Its changeset,.changeset/chat-product-authority.md, says: "Remove the obsoleteproduct-renewal registration attempt now that product grants are provisioned
on demand rather than renewed globally." The merge of that work into this
branch, 9b8b339 ("Merge qualified Chat and Profile authority into the
integration layer"), kept this branch's copy of the function, call included.
feat/chat-seity-profile(#1001) does not have the call. This branch,feat/media-on-jam-seity(#1217) andepoca/truapi-024do.mainis notaffected, because there the ledger accepts and renews product grants.
Change
allocate_statement_store_allowanceissues the allowance without touching therenewal ledger, as it does on
feat/chat-seity-profile. The ledger itself isunchanged: it still refuses product grants a host passes to
track_statement_renewal_targets, and still prunes product entries an olderbuild recorded.
Changeset
None added.
.changeset/chat-product-authority.mdon this branch alreadydescribes this removal, so this pull request needs the
no-changesetlabel forthe Changeset guard.
Tests
issuing_an_allowance_does_not_register_it_for_background_renewal, insigning_host/tests/allowance_keys.rs, issues an allowance on a chain whereit is already registered, records the
WARNevents emitted meanwhile, andexpects none. The test reaches
allocate_statement_store_allowancethrough thesigning host's own
statement_store_allowance_key; the SSO service calls thesame function when a paired product requests its allowance.
The test keeps a second tracing dispatcher alive while it runs. With only one,
tracing decides whether the warning's callsite is enabled from the first thread
to reach it, and a parallel test with no subscriber can switch it off for this
test, which then passes without seeing the warning. Without the second
dispatcher, most runs of the
signing_host::testsmodule passed even with theregistration call still in place: 17 of 20 in one series and 20 of 20 in
another.
Without the change the test fails with the warning above
(
product_id=myapp.dot) on every run: 20 of 20 runs of thesigning_host::testsmodule, 5 of 5 ofallowance_keysand 4 of 4 of thewhole library. With the change all of those runs pass.
cargo test -p truapi --all-features(Rust 1.98.1): 1931 passed, 0 failed,1 ignored.
cargo +nightly-2026-09-01 clippy -p truapi --all-targets --all-features -- -D warnings:no warnings.
cargo check --target wasm32-unknown-unknown -p truapi(Rust 1.96.0): nowarnings.
cargo build, beforeit reaches formatting, clippy or tests: the
wasm_bridge.rstests intruapi-codegensetapi_type_paths, a fieldBridgeCtxdoes not have(E0560). This pull request does not touch that, so its Rust workspace job
will fail the same way and the new test will not run in CI.
make fmt-checkalso already fails on this branch without this change (2,899hunks across the workspace). The added lines are formatted: rustfmt reports
the same 27 hunks in
allowance_keys.rsbefore and after, none on the newlines.