Skip to content

fix(api): isolate ticket response build locks - #43

Merged
ifuri-validator-agent[bot] merged 1 commit into
mainfrom
fix/striped-ticket-response-locks
Sep 1, 2026
Merged

fix(api): isolate ticket response build locks#43
ifuri-validator-agent[bot] merged 1 commit into
mainfrom
fix/striped-ticket-response-locks

Conversation

@tom-sapletta-com

Copy link
Copy Markdown
Contributor

Ticket: PLF-10675
Correlation ID: planfile-striped-response-locks

Outcome

Replaces the single long-held ticket response build lock with 32 bounded stripes while retaining a short state lock around the shared cache dictionaries. Unrelated queue and status views can now render concurrently; identical cache misses still coalesce into one build.

Safety

  • cache size and byte bounds are unchanged
  • cache dictionary iteration and eviction remain serialized
  • identical queries still share one response build
  • no per-query lock map or unbounded lock allocation

Verification

  • pytest -q: 399 passed, 6 skipped
  • ruff check planfile/api/server.py tests/test_sqlite_ticket_index.py
  • concurrency regressions prove unrelated views do not block and identical views still coalesce

@ifuri-validator-agent ifuri-validator-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Deterministic Validator approval for exact head 7f2abfd396ce4d63d92f518cd3ef8e0831779606.

Ticket: PLF-10675
Correlation ID: planfile-striped-response-locks
Model: zai/glm-5.3
Reviewed diff chunks: 1
Advisory LLM verdict: APPROVE
Advisory summary: Reviewed all 1 diff chunk(s). Replaces the single ticket-list response build lock with 32 striped RLocks keyed by hash of the query tuple, so unrelated queue/status views build concurrently while identical cache misses still coalesce. Cache dictionary mutation and eviction remain serialized under the short _TICKET_LIST_RESPONSE_CACHE_LOCK. Two concurrency regression tests cover both the striping and coalescing behavior.
Advisory findings: none
The LLM output above is advisory and was not used as the approval trust root.
Merge will be attempted after this approval when explicitly authorized.

Decision record (recomputable)

DECISION D-675-5074
TICKET PLF-10675
HEAD_SHA 7f2abfd396ce4d63d92f518cd3ef8e0831779606
CORRELATION_ID planfile-striped-response-locks
ACTOR agent:ifuri-validator-agent[bot]
APPLIED_RULE P-CORE-015
INPUT author_login = "tom-sapletta-com"
INPUT observed_checks = ["notify=PASS","ci-loop=PASS"]
INPUT required_checks = ["ci-loop","notify"]
INPUT required_checks_source = "protected registry (env/request)"
INPUT reviewer_login = "ifuri-validator-agent[bot]"
INPUT superseded_checks = []
VERDICT APPROVE AUTHORITY DETERMINISTIC
REJECTED REQUEST_CHANGES BECAUSE NO_UNSAFE_CHANGE_REASON_FOUND
ADVISORY llm_verdict = "APPROVE" MODEL "zai/glm-5.3"
ASSERT VERDICT_AUTHORITY != "ADVISORY"

@ifuri-validator-agent
ifuri-validator-agent Bot merged commit 86dbbbf into main Sep 1, 2026
2 checks passed
@ifuri-validator-agent
ifuri-validator-agent Bot deleted the fix/striped-ticket-response-locks branch September 1, 2026 11:58
@tom-sapletta-com
tom-sapletta-com restored the fix/striped-ticket-response-locks branch September 4, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant