oliver-zehentleitner / maity

hub: small leftovers: ticker.write held, merged.outsiders_work, claim_requests.tokens conn, namespace.kept_holders, the claim-request item built twice

Sign in to report

tsk-9xa700wfatfh Proposed

Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: debt and small copies.

What is wrong

  • ticker.write keeps a held parameter (ticker.py:296) that no caller passes since manual posts stopped holding agents (hub/context/ticker.md:292); the held: token loop (:335) and payload["held"] = list(held) (:349) are always empty.
  • merged.outsiders_work (merged.py:227-229) only forwards to own_approvals.outsiders_work; production calls the latter directly (routes/tasks.py:2845). Its callers are tests: test_merged_closes.py:1042-1043, test_outsider_join.py:779.
  • claim_requests.tokens(conn, rows) (claim_requests.py:241) never uses conn.
  • namespace.kept_holders (namespace.py:422-438) spells the length and product-word rule again instead of paths.kept_from_new_claims (paths.py:94-103).
  • The claim-request item {id, member_id, instance, requested_at} is built twice: claim_requests.view (claim_requests.py:80) and views._claim_requests (views.py:1201); views._can_confirm (:1158) then reads owner_id again for the same rows.

Proposal

  • Drop the held parameter and write "held": [] (or drop the key if the contract allows); delete merged.outsiders_work and point the tests at own_approvals; drop the unused argument; kept_holders calls paths.kept_from_new_claims(h) and h not in RESERVED_FIRST with its load-test exclusion; one item builder.

Effort / risk: S. Low.