Repository navigation
t18701: aidevops secret organise: plan-first cleanup of inconsistent credentials without renames #34723
Description
Task
Add aidevops secret organise: a guided, plan-first path for an install whose credentials are already inconsistent. It drafts registry entries and aliases and shows dependents, but never renames or deletes anything. Phase 6 of #34680 (guarantees 8, 9).
Full task brief and audit context
Task Brief
What
Add aidevops secret organise: a guided, plan-first path for an install whose credentials are already inconsistent. It drafts registry entries and aliases and shows dependents, but never renames or deletes anything. Phase 6 of #34680 (guarantees 8, 9).
Why
Cleaning up after the fact is risky: renames silently disable features, and some consumers can't be found by name. Operators therefore leave the mess in place and it grows.
How
- New
.agents/scripts/credential_inventory_organise.py. It combines the names-onlysecret-helper.sh inventory, the registry and the verifier cache, and proposes:- draft records for undescribed secrets (provider inferred from a known prefix,
confirmed: false, evidence noted); - account refs from the verified account names;
- aliases rather than renames for duplicate or overlapping tokens;
- a default decision per provider;
- a dependents count per credential.
- draft records for undescribed secrets (provider inferred from a known prefix,
--apply-draftswrites onlyconfirmed: falsedraft metadata. It never changes secret values, never renames and never deletes.- Output text or
--json. Delegate fromsecret-helper.sh.
Files Scope
.agents/scripts/credential_inventory_organise.py.agents/scripts/credential_inventory.py.agents/scripts/secret-helper.sh.agents/tools/credentials/credential-inventory.md
Acceptance Criteria
- On an install with undescribed Cloudflare secrets,
aidevops secret organise --jsonlists a draft per secret, provider defaults to decide, and alias proposals for overlapping tokens. -
--apply-draftsadds onlyconfirmed: falsemetadata; the stored secret names and values are byte-identical before and after.
Verification
Run the product path with a temporary HOME containing plaintext fallback credentials and a cache fixture, and compare the secret files before and after.
Parent: #34680
Brief workflow contract
Brief Workflow
This issue body is composed under .agents/workflows/brief.md. Newly queued auto-dispatch work must pass its Dispatch Readiness Contract (brief schema v2): complete write surface, hazards and compatibility, executable verification mapped to affected surfaces, and positive plus negative/regression acceptance criteria.
Parent: #34680
Synced from TODO.md by issue-sync-helper.sh
aidevops.sh v3.39.31 plugin for OpenCode v1.19.0 with claude-opus-5-5 spent 15m and 21,971 tokens on this with the user in an interactive session.
Activity
marcusquinn commentedon Oct 14, 2026
aidevops.sh v3.39.31 plugin for OpenCode v1.19.0 with claude-opus-5-5 spent 15m and 21,971 tokens on this with the user in an interactive session.
github-actions commentedon Oct 15, 2026
Completed via PR #34742. Task t18701 merged to main.
aidevops.sh vunknown automated scan.