fix(systems): audit the requester of an ordinary teardown recycle
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Read src/kdive/mcp/tools/lifecycle/systems/admin.py at the ordinary recycle paths around lines 541-556, then compare the authority path around lines 634 and 659-676. The issue leaves the audit behavior to an operator decision, so first resolve whether ordinary recycles should record the requester; if they should, add coverage with two distinct principals and confirm the recorded audit trail identifies the recycle requester.
Written by the indexing model from the issue text.
Description
Problem
A failed ordinary (non-authority) {uid}:teardown job is recycled by a later systems.teardown call. The recycled job keeps the first enqueuer's authorizing principal (ADR-0447) and nothing records who asked for the recycle. #3544 / commit 03037508d added that audit row for the authority path only.
Evidence
- src/kdive/mcp/tools/lifecycle/systems/admin.py:541-543:
dedup_replay(conn, _teardown_dedup_key(uid), recycle=FAILED)recycles with no callback. - admin.py:549-556: the
queue.enqueue(... recycle=FAILED)path likewise passes noon_recycle. - admin.py:634 and :659-676: the authority path passes
on_recycle=partial(_audit_authority_recycle, ...), writingtransition="teardown:recycled".
Expected
Operator decision first: record the requester for ordinary recycles too (consistent trail), or record that the ordinary path is deliberately unaudited.
Proposed approach
If approved, reuse the existing on_recycle callback at both ordinary sites, generalising _audit_authority_recycle (rename, no authority-specific fields), with a test using two distinct principals.
Provenance
Follow-up from campaign 4c2c8dc9e59d-7f9a87f5-2251-458a-bb30-04fbb2d4b05c. Source: #3544 scope exclusion.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 9h 13m
- Merged PRs (30d)
- 197
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from randomparity/kdive
-
area:core-platform effort:S priority:P3 risk:night-safe status:ready type:test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
randomparity/kdive#3620 ·
Maintainers usually reply within 1 day
-
area:providers effort:S priority:P3 risk:night-watch status:ready type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
randomparity/kdive#3618 ·
Maintainers usually reply within 1 day
-
area:core-platform effort:S priority:P3 risk:night-safe status:ready type:test
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
randomparity/kdive#3603 ·
Maintainers usually reply within 1 day
-
area:providers effort:S priority:P3 risk:night-safe status:ready type:docs
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
randomparity/kdive#3593 ·
Maintainers usually reply within 1 day
-
area:providers effort:S priority:P3 risk:night-safe status:ready type:refactor
Difficulty 1/5 Under an hour Newbie friendliness 84/100
randomparity/kdive#3592 ·
Maintainers usually reply within 1 day
All issues in randomparity/kdive
Similar issues
-
fleet size/m
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sipyourdrink-ltd/bernstein#7548 ·
Maintainers usually reply within 1 day
-
good first issue help wanted level 1 wocs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
GianlucaBave/murmury#73 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
G-nn-r/lg_heatpump#52 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
agno-agi/agno#11657 · 1 comment ·
Maintainers usually reply within 1 day
-
category:codebase:gpi category:codebase:handle type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day