Remote-first Forgejo ingest: prove remote-state path, then add remote commit ingest (Slice 1 -> 2) #109

Closed
opened 2026-06-17 11:09:28 +00:00 by coilysiren · 0 comments
Owner

Long-run contract - repo-recall remote-first on Forgejo (Slice 1 -> Slice 2, one run)

Launch: --dangerously-skip-permissions inside a container, per kai-long-run.
Work repo: coilyco-flight-deck/repo-recall. This contract lives in the tracking issue.

Goal

Make repo-recall run remote-first against Forgejo with no local clones. First prove
the existing remote-state path actually hydrates (Slice 1), then add Forgejo commits-API
ingest so commit history survives containerization (Slice 2). Caching is Slice 3, deferred.

Why (context)

Forgejo is self-hosted = no rate limits = safe to hammer. Containerization removes local
clones, so repo-recall must pull from the API and bank it. Commits today come ONLY from
local git/log.rs::scan - no client fetches them - so without remote commit ingest,
commit history vanishes in a container. Forgejo support (#88/#91) exists but has never
been run end-to-end.

Done-condition (verifiable, per slice)

Slice 1 - prove + harden (checkpoint + commit + push before Slice 2):

  1. REPO_RECALL_FORGEJO_TOKEN in SSM and wired into deploy/env (none exists today).
  2. With local repo dirs absent/empty, a refresh hydrates issues, PRs, milestones,
    active-repos - confirmed by reading real rows on the dashboard AND one MCP query, not
    "not configured".
  3. src/process/join.rs cross-ref parser recognizes the Forgejo host, not just
    github.com; new unit test beside the github one.
  4. pre-commit run --all-files and cargo test green.

Slice 2 - remote commit ingest:
5. The shared GithubClient trait (which the forgejo_client also implements) gains a
commit-fetch method; both GitHub and Forgejo impls satisfy it.
6. A remote-mode ingest path populates CommitRecord rows from the Forgejo commits API
with no local clone; spot-check a handful against Forgejo's web view.
7. Remote-mode is additive - it does NOT remove the local git ingest.
8. pre-commit run --all-files and cargo test green.

Non-goals (scope fence)

  • Caching layer = Slice 3 (file it).
  • Do NOT delete the local-git working-copy ingest (dirty/worktree/stale/churn) - it still
    serves non-container hosts. Remote-first is additive.
  • Working-copy-only signals are accepted losses in remote mode, not reconstructed.
  • fetch_deploy_health for Forgejo may stay deferred; implement only if cheap, else file.
  • cli-guard and ward are fenced - do not touch them.

Build path

  1. Open RUN.md journal. Confirm this contract from the tracking issue.
  2. Token -> SSM (coily ops aws ssm put-parameter --type SecureString), update SSM.md,
    wire into deploy/env.
  3. Refresh with empty local repo dirs; capture breakage; fix probe/dispatch/auth/parsers
    until Slice-1 rows hydrate. Extend join.rs + test. CHECKPOINT, commit, push to main.
  4. Add commit-fetch to the trait + both impls; add the remote ingest path -> CommitRecord;
    gate behind remote-mode; spot-check rows. Commit, push.
  5. End: file follow-ups (Slice 3 cache, deploy-health if deferred). Final report.

Long-run mechanics (per kai-long-run)

  • Journal each unit to RUN.md (decisions, dead-ends, next step) - survives compaction.
  • Checkpoint + commit + push at the Slice 1/2 boundary and at natural breaks.
  • Verify hydration by reading actual rows, never off a green build alone.
  • Wall detection: if Forgejo auth/probe fights back twice, journal + file an issue +
    pivot or park that thread, do not spin.
  • End report: done+verified / parked-with-links / needs-Kai.
# Long-run contract - repo-recall remote-first on Forgejo (Slice 1 -> Slice 2, one run) Launch: `--dangerously-skip-permissions` inside a container, per kai-long-run. Work repo: coilyco-flight-deck/repo-recall. This contract lives in the tracking issue. ## Goal Make repo-recall run **remote-first against Forgejo with no local clones**. First prove the existing remote-state path actually hydrates (Slice 1), then add Forgejo commits-API ingest so commit history survives containerization (Slice 2). Caching is Slice 3, deferred. ## Why (context) Forgejo is self-hosted = no rate limits = safe to hammer. Containerization removes local clones, so repo-recall must pull from the API and bank it. Commits today come ONLY from local `git/log.rs::scan` - no client fetches them - so without remote commit ingest, commit history vanishes in a container. Forgejo support (#88/#91) exists but has never been run end-to-end. ## Done-condition (verifiable, per slice) **Slice 1 - prove + harden (checkpoint + commit + push before Slice 2):** 1. `REPO_RECALL_FORGEJO_TOKEN` in SSM and wired into deploy/env (none exists today). 2. With local repo dirs absent/empty, a refresh hydrates issues, PRs, milestones, active-repos - confirmed by reading real rows on the dashboard AND one MCP query, not "not configured". 3. `src/process/join.rs` cross-ref parser recognizes the Forgejo host, not just `github.com`; new unit test beside the github one. 4. `pre-commit run --all-files` and `cargo test` green. **Slice 2 - remote commit ingest:** 5. The shared `GithubClient` trait (which the forgejo_client also implements) gains a commit-fetch method; both GitHub and Forgejo impls satisfy it. 6. A remote-mode ingest path populates `CommitRecord` rows from the Forgejo commits API with no local clone; spot-check a handful against Forgejo's web view. 7. Remote-mode is additive - it does NOT remove the local git ingest. 8. `pre-commit run --all-files` and `cargo test` green. ## Non-goals (scope fence) - Caching layer = Slice 3 (file it). - Do NOT delete the local-git working-copy ingest (dirty/worktree/stale/churn) - it still serves non-container hosts. Remote-first is additive. - Working-copy-only signals are accepted losses in remote mode, not reconstructed. - `fetch_deploy_health` for Forgejo may stay deferred; implement only if cheap, else file. - **cli-guard and ward are fenced - do not touch them.** ## Build path 1. Open RUN.md journal. Confirm this contract from the tracking issue. 2. Token -> SSM (`coily ops aws ssm put-parameter --type SecureString`), update SSM.md, wire into deploy/env. 3. Refresh with empty local repo dirs; capture breakage; fix probe/dispatch/auth/parsers until Slice-1 rows hydrate. Extend join.rs + test. CHECKPOINT, commit, push to main. 4. Add commit-fetch to the trait + both impls; add the remote ingest path -> CommitRecord; gate behind remote-mode; spot-check rows. Commit, push. 5. End: file follow-ups (Slice 3 cache, deploy-health if deferred). Final report. ## Long-run mechanics (per kai-long-run) - Journal each unit to RUN.md (decisions, dead-ends, next step) - survives compaction. - Checkpoint + commit + push at the Slice 1/2 boundary and at natural breaks. - Verify hydration by reading actual rows, never off a green build alone. - Wall detection: if Forgejo auth/probe fights back twice, journal + file an issue + pivot or park that thread, do not spin. - End report: done+verified / parked-with-links / needs-Kai.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/repo-recall#109
No description provided.