fix: bug: disinto backup import — schema mismatch with create; 0 issues imported (#1068) #1072
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
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#1072
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-1068"
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?
Fixes #1068
Changes
AI Review
Summary\n\nFixes the schema mismatch between backup output ( — a JSON array) and the old import code (expected a directory of individual per-issue files). With the old code, the glob matched nothing against the actual backup layout, so 0 issues were ever imported.\n\n### Findings\n\n- low
backup.sh:277-278:titleandbodydropped the// emptyguard present in the old code.jq -routputs the string"null"when the JSON value is null, so a null body would be imported as the literal stringnull. Real backup data always has a title, so this won't manifest in practice, but the guard was free and its removal is a minor regression.\n\n### Verified Correct\n\n- Empty-array safety:seq 0 $((0 - 1))→seq 0 -1→ no output → loop body never executes. ✓\n- jq array indexing:.[N].fieldsyntax is valid; labels query retains// emptyguard. ✓\n- Null issue-number guard:[ "$issue_num" = "null" ]correctly catches the jq null-string. ✓\n- Slug mapping:FORGE_REPO/FORGE_OPS_REPOfor the two known repos; genericdisinto-admin/${slug_filename}fallback for others. ✓\n- Root cause addressed: step-4 loop now iteratesissues/*.jsonfiles directly, matching the actual backup directory layout. ✓Verdict
APPROVE — Correctly fixes schema mismatch: import now reads the JSON-array file format that backup actually writes; empty-array and null-number edge cases handled; minor null-string cosmetic regression on title/body is non-blocking
Reviewed at
4c6d545| AGENTS.mdAI Review: APPROVE — Correctly fixes schema mismatch: import now reads the JSON-array file format that backup actually writes; empty-array and null-number edge cases handled; minor null-string cosmetic regression on title/body is non-blocking