Skip to content

Feat/forge gitea - #61

Closed
mnphuc wants to merge 8 commits into
EricTechPro:mainfrom
mnphuc:feat/forge-gitea
Closed

mnphuc wants to merge 8 commits into
EricTechPro:mainfrom
mnphuc:feat/forge-gitea

Conversation

@mnphuc

@mnphuc mnphuc commented Oct 16, 2026

Copy link
Copy Markdown

No description provided.

mnphuc and others added 8 commits October 16, 2026 13:52
- super-board-forge.py/.sh: one source of truth for github|gitea (env → config → remote → default github), read/write dispatch, shared halt discipline
- super-board-gitea-read.py: bounded read-only Gitea evidence via tea; same CLI, kinds, exit codes (79/64) and halt file as github-read; composite reads normalize to the github shapes (items/fields/quota/approval…)
- super-board-gitea-api.sh: low-level tea api writes with SB_GITEA_TIMEOUT-bounded spawns and label create/attach
- evals/_stubs/bin/tea: stateful offline tea stub (fixtures + tea-state.json, calls/writes logs, rate-limit headers)
- config-schema: forge/forge_host/forge_login keys; setup.py BIN + parse_remote; install.sh copies the new scripts
- tests: test_forge.py, test-forge.sh, test_gitea_reads.py, test-gitea-api.sh (all offline)

Co-Authored-By: Claude Code <noreply@anthropic.com>
- card.sh: forge-resolved dispatch; gitea branch reads columns/items through gitea-read and moves cards via the projects move endpoint; same cache shape, verbs and exit codes (3/64/66/69/79)
- status.py: gitea branch renders the same snapshot from one normalized board read + comments for Blocked reason tags; 79 propagates from the halt file
- setup.py: tea in TOOLS (brew/winget/dl.gitea.com), tea_probe (a hung binary counts as missing), forge-aware check() tool requirements, board-rank --forge gitea, board-migrate gitea (additive columns/labels, Skipped→Done, old-label mapping, --prune-empty, idempotent re-runs, snapshot under migrations/)
- setup.py Windows hardening surfaced by the new paths: bash resolved via shutil.which (System32 WSL no longer shadows Git bash), UTF-8 for stdout, child-process capture and file reads
- gitea-read: UTF-8 decode of tea output (emoji reason tags survived cp1252 before); gitea-api: SB_GITEA_TEA splits quoted paths
- tea stub: per-project columns (_project), DELETE column route, write-route ordering fix (case globs span slashes)
- tests: test-card-gitea.sh (7), test-status-gitea.sh (4), test-setup-gitea.sh (4) — all offline

Co-Authored-By: Claude Code <noreply@anthropic.com>
- gh-guard: sb_gh_guard_kind/sb_gh_guard_quota dispatch; gitea guard_check reads the api bucket through gitea-read and never sleeps when the instance has rate limits disabled (the local budget stays the protection); summary appends rate_limits=off
- throttle: gitea steps max_workers down on the core bucket (graphql mirror on github unchanged); disabled limits only trip on real lane-result evidence; 429/too-many-requests added to the failure grep
- tea stub: X-RateLimit-Remaining overridable via fixture
- tests: test-gh-guard-gitea.sh (4), gitea cases in test-throttle.sh; all 7 github sections still pass

Co-Authored-By: Claude Code <noreply@anthropic.com>
- merge-gate: gitea squash-merge via POST pulls/{i}/merge pinned with head_commit_id (the --match-head-commit analog); lost-response path unchanged (MERGED→0, head moved→6, else halt→79); approval calls carry --forge
- approval.py: Gitea class — head/state + Closes-trailer links through gitea-read, owner/collaborator trust with fail-closed permission reads
- pr-body: gitea PATCH pulls/{i} through tea api, GITEA_REPO twin of GH_REPO, same block splice + head pin (exit 6)
- run.sh (legacy dispatcher): forge_resolved checkpoints, forge_assign/forge_comment with the same halt-on-unknown-outcome discipline, gitea card moves via card.sh, quota guard reads the gitea bucket
- stop.sh: PR lookup via prs-open, comments via the shared issues endpoint (a Gitea PR is an issue), assignee/label release through tea api — still best-effort
- file-bug / file-refactor / collect-file: resolve-or-create label ids, POST issues with label ids, one-step column placement, dedupe via issue-history, SB_FORGE/SB_CONFIG passed to child filers
- wave.js: input.forge switches READ_SHAPES/READ_FAILURE/BOARD_IO wording and the classify label one-liner (sb_forge_label_add on gitea)
- gitea-api: SB_GITEA_TIMEOUT defaults safely under set -u
- tests: test-pr-body-gitea.sh (5), merge head-pin cases in test-gitea-api.sh (8)

Co-Authored-By: Claude Code <noreply@anthropic.com>
- gitea-read: --deps composite (open issues + last 8 comments) emitting the GraphQL node shape the deps parser reads
- deps.sh: --forge flag (+ SB_FORGE env); approval enrichment carries --forge
- preflight.sh: --forge flag; merged/open/closed/target reads through gitea-read with identical normalized shapes
- cleanup-wt.py: pull_requests dispatches to tea (CLEANUP_WT_TEA / SB_FORGE / non-github remote); remote-branch safety unchanged — an unavailable forge CLI still keeps branches
- collect_prs.py: gitea list via pulls?state=closed&sort=recentupdate with per-PR comments/reviews; documented degradations (no reviewThreads, mergedAt from closed_at)
- wave-plan.sh: forge resolved once from the config and exported (SB_FORGE_*), deps repo derivation works for any host
- codex-lane/codex-wave: helper + prompts follow the config's forge; merge line forbids bare tea pulls merge too
- tests: test-deps-gitea.sh; full gitea suite (11 bash + 2 python) green

Co-Authored-By: Claude Code <noreply@anthropic.com>
- onboard.md: step 0 forge hint from the origin remote; step 2 becomes 🔑 FORGE with a full gitea branch (tea probe/reinstall, host, token via tea login add or GITEA_TOKEN+TEA_HOST, /user verify, swagger capability gate on the projects-columns API, bot identity without [bot]); step 3 board-rank/board-migrate/create gain --forge gitea forms (project.number = API id); step 6 swaps the gh permission lines for Bash(tea:*); step 7 pings tea api /user; step 8 writes forge/forge_host/forge_login; self-check and error table cover gitea
- answers file: answers.forge block documented for both forges
- get.sh: notes why tea is not inventoried there (setup.py needs owns it)

Co-Authored-By: Claude Code <noreply@anthropic.com>
- writing-standard.md FIRST (repo rule): screenshot embed rule is now forge-parameterized — GitHub /raw/<sha>/ vs Gitea /raw/commit/<sha>/ (branch: raw/branch/<b>/)
- new references/gitea.md: model mapping, gh↔tea command dictionary, gitea-read kinds, lane checklist, accepted degradations (no GraphQL, no CAS claim, Closes-trailer links, stateReason, draft cards), troubleshooting (hung tea.exe, 401, old instances, API-id vs UI number)
- one conditional note per SKILL.md (build/qa/review/collect/git-sync) instead of duplicating commands
- run.md preconditions (forge auth + guard rows), run-workflow.md (wave args gain forge; tea permission line), stop.md, status.md, lint.md tool line, second-account.md Gitea section, rate-limit-etiquette.md gitea budget discipline + forge-neutral gh-quota-on-exit line
- README.md, skills/super-board/README.md, docs/super-board/README.md (forge key + Gitea note), CLAUDE.md (forge dispatch code map, worker rules, install tree, board shape)

Co-Authored-By: Claude Code <noreply@anthropic.com>
- VERSION + skills/super-board/VERSION → 3.2.0
- RELEASE-NOTES: the forge adapter layer, gitea-read/api, projects-columns board, merge-gate pinning, onboard forge step, rate-limit honesty, offline tea stub + 10 new suites, Windows onboard repairs, gitea.md, minimum tea 0.16.x + projects-columns Gitea
- evals/README: the stateful tea stub protocol (fixtures, tea-state.json, calls/writes logs)

Co-Authored-By: Claude Code <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mnphuc mnphuc closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant