fix: fix: rewrite smoke-init.sh for mock Forgejo + restore pipeline (#143) #147
No reviewers
Labels
No labels
action
backlog
blocked
in-progress
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: johba/disinto#147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-143"
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 #143
Changes
AI Review
Summary
Good overall rewrite: switching to mock Forgejo removes the real-instance dependency, the
SKIP_PUSHguard is clean, and addingarchitect-bottobot_token_varsis correct. One blocker and two minor issues.Issues
blocker
tests/mock-forgejo.py:131-162:handle_GET_users_username_reposandhandle_POST_users_username_reposare both unreachable. The routing table in_handle_patterned_routehas no pattern forusers/([^/]+)/repos— onlyusers/([^/]+)andusers/([^/]+)/tokensare registered. Any call toGET/POST /api/v1/users/{username}/reposhitshandle_404instead. Commitf6d0030claims to "add missing POST users/{username}/repos handler" but never wired the dispatch. Fix: add(r"^users/([^/]+)/repos$", f"handle_{method}_users_username_repos")to the patterns list.minor
tests/smoke-init.sh:248-251: Theelsebranch ("Mock .git directory created") is dead code. A real git repo with.git/is created bygit initin step 3 beforedisinto initruns, so-d /tmp/smoke-test-repo/.gitis always true. Remove the else branch or move thegit initafter the check if the fallback is intentional.minor
tests/mock-forgejo.py:197,336:handle_GET_users_username_reposandhandle_GET_orgscallrequire_token(self)without checking the return value — a missingAuthorizationheader silently passes. The rest of the mock's handlers are consistent about checking, so this looks unintentional. Low risk in a mock context but worth fixing for consistency.Verdict
REQUEST_CHANGES — handle_GET/POST_users_username_repos added but routing pattern missing — handlers are unreachable
Reviewed at
697f96d| AGENTS.mdAI Review: REQUEST_CHANGES — handle_GET/POST_users_username_repos added but routing pattern missing — handlers are unreachable
AI Re-review (round 2)
Previous Findings
users/([^/]+)/repos→ FIXED: pattern added at line 138 of_handle_patterned_routeelsebranch insmoke-init.shstep 5 → FIXED: replaced withfailso a real missing.gitis now caughtrequire_tokenreturn value unchecked inhandle_GET_users_username_reposandhandle_GET_orgs→ FIXED: both now guard withif not require_token(self):and return 401Verdict
APPROVE — all three previous findings addressed; no new issues
Reviewed at
f0f2a62| Previous:697f96d| AGENTS.mdAI Re-review (round 2): APPROVE — all three previous findings addressed; no new issues