fix(deps): addIssueDependency sends {index} without owner/repo — 404 #213
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#213
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?
Bug
apps/server/src/forgejo-api.ts::addIssueDependencyposts{index: N}as the body, but Forgejo's native/repos/{repo}/issues/{N}/dependenciesendpoint requires{owner, repo, index}. With only{index}, Forgejo returns404 IsErrRepoNotExist— the API tries to look up the blocker's repo from the body fields and fails becauseowner_nameis empty.Discovered while running
just deps-backfill charles/claude-hookson 2026-04-21 against freshly-created issues #208–#212. All three body-parsed edges failed silently (created=0 failed=3).Repro
Acceptance criteria
apps/server/src/forgejo-api.ts::addIssueDependencysplitsrepoas<owner>/<name>and sends{owner, repo: name, index: blockerNumber}in the POST body./dependencies(checkremoveIssueDependency//blocksendpoints — Forgejo uses the same meta-payload convention for all issue-edge mutations).apps/server/src/deps.test.ts(or a newforgejo-api.test.ts) covers the payload shape — bun:test'smock()onfetchis enough; assert the body JSON includesowner+repo.just deps-backfill charles/claude-hooksreruns clean (idempotent — Forgejo returns 201 once, then 200/409 on retries).deps-backfillfailed to create on 2026-04-21 are in place — wired manually via curl as a stopgap, so this ticket is purely the code fix + regression test.Out of scope
References
apps/server/src/forgejo-api.ts:399-418— broken payload.apps/server/src/deps.ts:710-736— backfill orchestrator (unchanged, just calls the fixed helper).POST /repos/{owner}/{repo}/issues/{index}/dependencies— theIssueMetabody schema.