investigate(mobile): fix Forji iOS Forgejo PAT auth and prepare upstream PRs #133
Labels
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/platform#133
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?
Context
Piotr uses / wants to use Forji as an iOS/mobile Forgejo client:
Current problem: Forji does not work reliably on Piotr's iOS setup with his Forgejo PATs, even though it should. This matters because mobile Forgejo/Projects access could become an important operator surface for the broader Platform / Iskra / Swarmheart workflow.
Piotr's direction: attack the problem properly and prepare one or more upstream PRs if needed, not only a local workaround.
Why this belongs in platform
This is not just a mobile-app annoyance. If Forgejo Projects/issues are part of the downstream coordination surface, then mobile access needs to be reliable enough for:
Goals
git.pdurlej.comif possible without exposing secrets.Constraints / safety
Suggested investigation plan
git.pdurlej.com:/api/v1/userwith a known-valid token,token,Bearer, Basic, or something else,Potential PR candidates
Depending on findings:
Acceptance criteria
Related context
2026-05-09 synthesis: Opus + GPT-5.5 Pro + Iskra
We ran a three-model investigation pass over Forji / ForgejoKit for Piotr's self-hosted Forgejo + iOS + PAT problem.
Shared conclusion
Do not chase
Bearervstokenas the main issue. Forgejo acceptsAuthorization: token <PAT>for PATs, and Piotr'sgit.pdurlej.comaccepted bothtokenandBearerfor/api/v1/userin a live check.The stronger pattern is:
/userreturn 200?”Live version check:
Evidence-backed findings from Opus pass
Opus verified current code and identified two concrete findings:
Likely root cause of misleading iOS/PAT symptom
In
AuthenticationService.restoreWithCredentials, errors fromfetchCurrentUser()are broadly caught and, for token-only restore, converted toSessionRestoreError.tokenExpired.Practical effect: SSL failure, network failure, 403 missing scope, 5xx, timeout, decoding error, etc. may be presented to the user as expired/revoked token.
Small high-confidence upstream PR candidate
MultiInstanceManagerbuilds a dictionary keyed only byserverURL:Two accounts on the same Forgejo instance can trigger a duplicate-key fatal error. Realistic scenario:
piotr+iskra-botongit.pdurlej.com.GPT-5.5 Pro additions
GPT-5.5 Pro independently converged on:
normalizedURL + username, especially across username rename, URL variants, multi-instance, migration, reinstall/update, or App ID/access group changes;/user-first login model. A futurerepo-bound token modecould validate explicitowner/repo+ issues endpoints instead of requiring full account-level identity/notifications.Updated implementation order
Use two tracks: a tiny credibility PR first, then the real diagnostic/auth work.
PR 0 — Forji: fix multi-instance duplicate server crash
Repository:
secana/ForjiGoal: replace
serverURL-only dictionary key with a composite key such as(normalized serverURL, username)or equivalent stable account key.Why first:
Acceptance criteria:
serverURLbut different usernames no longer crash;PR 1 — ForgejoKit: structured auth/network/decoding errors
Repository:
secana/ForgejoKitGoal: preserve error classes instead of collapsing them into generic auth failure.
Acceptance criteria:
token=, oraccess_token=can appear in error/debug output;PR 2 — Forji: preserve restore error context and improve alerts
Repository:
secana/ForjiGoal: stop turning every token-only restore failure into
tokenExpired.User-facing examples:
PR 3 — ForgejoKit/Forji: PAT capability checker
Goal: validate what a PAT can actually do by probing safe endpoints.
Suggested capabilities:
/api/v1/version/api/v1/user/api/v1/repos/{owner}/{repo}/api/v1/repos/{owner}/{repo}/issues?state=all&limit=1Recommended mobile-triage PAT for Piotr-style operator surface:
read:userread:repositoryread:issuewrite:issueread:notificationwrite:notificationonly if Forji marks notifications readwrite:repositoryunless phone must mutate repo contents / dispatch workflowsPR 4 — Forji: Keychain v2 / stable account ID
Goal: eventually move from raw
normalizedURL + usernameto a stable account identity, preferably based on canonical server/base path + Forgejouser.id, while preserving migration from existing keychain entries.This is valuable but riskier than PR 0–3, so it should not be first.
Product Pro Summit / operator workflow decision
For demo and near-term agent workflows:
agent:pending-reviewagent:needs-approvalagent:blockedagent:ready-to-mergerisk:highsource:iskrasource:swarmheart/accept,/reject,/retry,/escalatestyle commands.Do not make Forgejo Projects API the critical path for the first demo. Treat Projects as a later optional UI layer after confirming endpoint availability in
swagger.v1.jsonand Forji/ForgejoKit support.Coding-agent brief
Goal: improve Forji/ForgejoKit for self-hosted Forgejo PAT auth on iOS with safe diagnostics, correct error classification, stable account storage, and capability validation.
Non-goals:
tokentoBearerwithout evidence;Security requirements:
Codex status — upstream Forji PR 0
Current upstream posture: keep changes small and maintainer-friendly. Do not open the next PR until
secana/Forji#29is merged/commented on or enough time passes without maintainer response.Status:
normalized serverURL + username) instead ofserverURLonly.MultiInstanceManagerTestspassed on iPhone 17 Pro simulator, iOS 26.4.1.codex/multi-instance-account-keyin/Users/pd/Developer/forji-upstream.Next prepared-but-not-published work: local ForgejoKit PR 1 sketch for typed auth/server errors. Do not publish it before maintainer signal on PR 0.
Status update from claude (Earl Grey fork, Batch E) — 2026-05-17
Upstream state
secana/ForgejoKit#3(fix: preserve merge error context) — OPEN, awaiting maintainer. Operator-authored.secana/Forji#31(refactor: use ForgejoKit error categories) — OPEN, awaiting maintainer. Operator-authored.Prebuild for outstanding 3 upstream PRs
Spec Kit prepared at
docs/specs/forji-mobile-pat-v0/+ companion execution prompt atprompts/codex-forji-mobile-pat.md— PR #334.Three remaining upstream PR drafts from 2026-05-09 three-model synthesis:
secana/ForjiPR0secana/ForgejoKit+secana/ForjiPR3secana/ForjiPR4Operator action queue
prompts/codex-forji-mobile-pat.mdper dispatch pattern from #323/#324/#325pdurlej/Forji+pdurlej/ForgejoKitforks (both exist on codeberg)Decisions to confirm before slice (b) starts
iskra-bot@git.pdurlej.com. Override?After all 5 upstream PRs land
Issue #133 closed with summary + operator mobile workflow verified working on iPhone.
🍵 Batch E delivered. Returning to operator handoff.
Parked from M08 to M10 per Iskra supplemental triage. Mobile Forgejo UX is useful, but not current Persona/OpenClaw critical path. No runtime mutation was performed.
Parked (p3, M10 closure plan #653 + Judging Claw priority). Reactivate when mobile Forgejo (Forji iOS) access is prioritized.
{
"confidence": 4,
"effort_hint": "medium",
"escalation": {
"kind": "none",
"reason": ""
},
"evidence_refs": [
{
"note": "Issue investigates Forji iOS Forgejo PAT auth and possible upstream fixes.",
"type": "forgejo",
"value": "issue-title-body-labels-and-target-snapshot"
},
{
"note": "Body frames mobile Forgejo access as useful for operator triage, approvals, and demos.",
"type": "forgejo",
"value": "issue-body-platform-relevance"
},
{
"note": "Snapshot labels mark the issue as priority p3 and parked.",
"type": "snapshot",
"value": "target-snapshot-labels"
}
],
"impact": 2,
"judge_actor": {
"name": "iskra",
"runtime": "openclaw"
},
"judged_at": "2026-06-08T01:02:00Z",
"labels_to_apply": [
"judge/p3"
],
"piotr_fit": "medium",
"priority": "p3",
"rationale_summary": "This is P3 observe work because reliable mobile Forgejo access is useful but currently parked behind higher-priority platform safety work.",
"reach": 3,
"recommended_next_action": "observe",
"rerun_reason": "no_prior_judgment",
"schema": "openclaw.judge.v0",
"target": {
"kind": "issue",
"number": 133,
"repo": "pdurlej/platform"
},
"target_snapshot": {
"body_hash": "sha256:c4ef3c0f62acd75506d865795e46ebdce4ff134c77df4984d90dff2a2ebafd0f",
"commit_count": null,
"evidence_hash": "sha256:d0d5124daabadac765996b1ea04974ce348a81a17964616a6f90b8f93c497312",
"head_sha": null,
"labels": [
"priority:p3",
"status:parked"
],
"labels_hash": "sha256:70bfe69a42f166841b4645bc96bcb858084f4174783502fb4cef5ef76e679e84",
"state": "open",
"title_hash": "sha256:a8c9710c1667a0b5a510be72e86d3db49633fc5687fec297e3cf04cb2b730737",
"updated_at": "2026-06-01T08:53:14+02:00"
},
"top_caveat": "Do not let mobile-client debugging displace core agent-access and approval-boundary work."
}