fix: disinto init must be fully idempotent — safe to re-run on existing factory #239
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#239
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Running
disinto inita second time on an existing factory produces a mix of skips, silent failures, and partial re-creation. It is not safe to re-run for corrective purposes.Specific gaps:
Expected behavior
disinto initshould be safe to run at any time on an existing factory. It should:Affected files
Acceptance criteria
disinto init <repo-url>twice in a row produces identical results|| trueswallowing of errors that indicate broken stateDependencies
Depends on #240, #241
CI failure diagnosis (from manual investigation)
The smoke-init CI step fails because the mock Forgejo server (tests/mock-forgejo.py) does not handle the admin repo creation endpoint:
The init code now uses this endpoint (from #240 fix) to create the ops repo under disinto-admin. The mock returns 404, init fails with:
Fix required
Add a route to tests/mock-forgejo.py that handles POST /api/v1/admin/users/{username}/repos. It should behave like the existing POST /api/v1/user/repos handler but create the repo under the specified username namespace instead of the authenticated user.
Look at the existing mock routes in mock-forgejo.py for the pattern. The response format should match Forgejo's actual response (JSON with id, name, full_name, clone_url, etc.).
How to verify
Run the smoke test locally:
Both the ci and smoke-init steps should pass.
Blocked — issue #239
ci_exhausted2026-04-05T18:46:05ZBlocked — issue #239
no_push2026-04-05T19:56:43ZDiagnostic output
Blocked — issue #239
no_push2026-04-05T20:08:04ZDiagnostic output
Blocked — issue #239
no_push2026-04-05T20:23:23ZDiagnostic output
Blocked — issue #239
no_push2026-04-05T20:37:20ZDiagnostic output
Blocked — issue #239
review_exhausted2026-04-05T21:54:37Z