Skip to content

feat(git): add Forgejo and Gitea source-control support - #798

Open
rynfar wants to merge 6 commits into
pylonfrom
upstream/2026-09-24-forgejo-gitea
Open

rynfar wants to merge 6 commits into
pylonfrom
upstream/2026-09-24-forgejo-gitea

Conversation

@rynfar

@rynfar rynfar commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Forgejo and Gitea repositories can now be discovered through fj or tea, cloned or published, and browsed through Pylon’s pull request surfaces. This ports T3 source 6fd68f5c3e7c81a9650ba36df32f2241912e00ba while preserving Pylon’s existing source-control providers and server-local credential routing. Forgejo HTTP failures expose status and a fixed message, not response bodies.

Older clients can still use a server with Forgejo repositories: absent capability flags filter Forgejo discovery/list rows and Git status provider metadata; linked-thread snapshots remain provider-neutral, while old-client Forgejo summary/detail reads return a typed unsupported error. Clone and project-clone operations keep successful Git results but omit optional Forgejo repository metadata for old clients, including per-subscriber clone progress. New clients opt in through optional request fields, which old servers accept.

Gitea's pull-list API lacks a head-branch filter. Branch search therefore scans at most 20 pages and 20 seconds, filters the confirmed fork repository before applying the result limit, and returns a typed incomplete-search error if the scan budget is exhausted. It never reports a truncated scan as a complete empty result.

This branch includes reviewed PR #785 (8e27ef68418cc36f5beb1b7a32fb7741f61930dd) as an explicit prerequisite. The reconciled checkout panel keeps known-host commands available while detail loads; Forgejo checkout appears only after loaded detail supplies the repository URL, which is shell quoted before fetching the pull ref. The three affected web files match the independently reviewed multi-PR rehearsal apart from removing an unused import.

Validation: 532 focused tests across 11 files on the initial implementation; 136 focused SourceControlDiscovery/GitManager tests after the scan and fork-identity fixes; server, contracts, client-runtime, web, mobile, and shared typechecks; changed-file lint and format checks. The prerequisite merge at cefe3febb158ca1f530f613195fe33bcd976095b passed 124 focused checkout tests, web typecheck, scoped lint/format, and frozen install; its exact merge resolution passed independent review. Full CI on this new head is pending. Browser/device verification was not performed because this task has no browser/device approval. No live provider credentials or accounts were used.

Source disposition: 6fd68f5c3e7c81a9650ba36df32f2241912e00ba adopted with Pylon adaptations; HTTP response-body redaction from mixed 24b711b7f9ccba03518551991e466e2e4f8ace5a adopted here. Generic viewed-file provider API 03950089ffa5cecf0ce731227f58551f6437495f remains a separate follow-up.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Reconciled head a9369761585dcd069c56c9b20d1347ad62d856b8 includes current pylon through #804. On that head, 369 focused Git/PR service/web logic tests and 139 worker/web logic tests passed, as did server and web typechecks, frozen offline install, and scoped format. Final-head CI is pending; isolated UI and live Forgejo host evidence have not been run.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pylon-marketing Ready Ready Preview Sep 25, 2026 8:04am UTC

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.9 KiB 14.0 KiB +22 B (+0.2%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB −18 B (−0.2%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.7 KiB 6.8 KiB +40 B (+0.6%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.0 KiB 58.0 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 14.0 KiB 14.0 KiB −5 B (−0.0%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB −1 B (−0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.7 KiB 6.7 KiB −4 B (−0.1%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 58.9 KiB 58.9 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: 05f4d0c · PR result: a936976 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Preserve checkout while detail loads and pass the trusted loaded repository URL for Forgejo pull-ref fetches.
@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

Deployment failed for project pylon-marketing with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/pylon-code?upgradeToPro=build-rate-limit

@rynfar rynfar changed the title Add Forgejo and Gitea source-control support feat(git): add Forgejo and Gitea source-control support Sep 24, 2026

This branch was successfully deployed

1 active deployment
Preview — a9369761 Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant