Repository navigation
Description
Summary
Two connected changes to where work enters the platform:
- Agents report new findings straight into Tale, as native tasks, and never as issues on GitHub or Forgejo. A finding is not published or synced anywhere outside the platform.
- GitHub issues sync with Tale, and Forgejo issues sync with Tale, but the two forges never sync with each other. Tale is the hub. There is no edge between the forges, and nothing Tale reads from one is ever written to the other.
Today the loop leaves the platform and comes back. Per the request that opened this issue, new findings are reported to the repository's GitHub tracker. The autonomous cycle's declarations route "confirmed findings" to "the existing queue" without naming a native path, its workers hold a repository-scoped token, and the manager's full pass imports the repository's open GitHub issues back as tasks (github-import-issues, paged by cursor, every full pass). That costs API reads and a token with issue rights, loses provenance (which agent, which run, which head), and publishes findings, security-relevant ones included, to a public tracker unless an agent remembers not to. The cycle's briefs already say private findings stay in the task audience and are never published to the public repository; this makes that structural instead of a rule an agent has to follow.
A repository's issues can also live on GitHub, on a Forgejo instance, or on both, so the platform needs a rule for that which is not "mirror everything".
It proposes a shape, not a final design. The forks at the end are the owner's.
What exists (anchors: main 40e7a56, 2026-10-13)
- Issue intake is read-only vendor sync (
services/platform/lib/connectors/natives/issue-import.ts: "Both providers share bounded, resumable discovery and return the same task-intake shape. Source snapshots are separate from local task edits; missing upstream rows are marked unavailable and never interpreted as a request to delete or complete work"). Providers:githubandglitchtip(ImportedIssue.externalSystem). Connectors:*.list_import_issues,*.get_import_issue,*.refresh_import_issues; starter automationsgithub-import-issuesandglitchtip-import-issues(configs/platform/custom/automations/); cursors in migration 0140. There is no outbound issue write, and nothing mentions Forgejo. - One binding per task: a task has one
(external_system, external_id)pair, unique per project (migration 0059), with the vendor-stable id fromtaskExternalIssueSchema. - Agents have a native
task_create(a project-bound run creates in its own project; a run confined to one task may only add subtasks) andtask_upsert_by_external_ref(idempotent on(externalSystem, externalId),dedupeScopeoforgorproject), both inbackend/core/node_only/sandbox/workspace_tools_bridge.ts(:266,:399).
Proposal
A. Native finding intake
- Roles that find things hold
task_createand report with a fingerprint (the coverage inventory's stable surface-by-risk case id is one), so a re-report updates one task (last seen, evidence, a reopen on regression) instead of creating a second. - A finding carries provenance: the reporting agent and run, the source head, a severity (as priority) and evidence references.
- There is no outbound path. Nothing publishes a native task, and the reporting path makes no forge call (a test asserts it).
- The cycle's briefs and tool grants change in the same stroke: roles stop being told, or able, to create forge issues, and the repository token keeps what branches and pull requests need while issue rights come off it if it has them. These declarations live in the private ops repository; that part of the change is tracked here.
B. Hub-and-spoke sync
GitHub issue <-> Tale task <-> Forgejo issue (never GitHub <-> Forgejo)
native task (no binding, never published)
- Add Forgejo as an issue source with the same shape as GitHub's:
forgejo.list_import_issues,get_import_issue,refresh_import_issues, aforgejo-import-issuesstarter automation, credentials and base URL in settings, the same cursor, receipt and "unavailable, never deleted" semantics.external_systemisforgejo, andexternal_idis namespaced by instance so two instances cannot collide. - At most one binding per task, enforced where it already is (the unique pair) and tested. Nothing Tale reads from one forge can become a write to the other, and no transitive path exists.
- A repository that has issues on both forges must not land in one project twice by accident: a per-project declaration of its (forge, repository) sources, with a refusal when the same repository arrives from two forges unless that is explicit.
- Same edit rule as today: the source snapshot is separate from Tale's local edits.
Forks (recommendation in bold)
- Does "sync" mean outbound too? Version 1 is inbound for both forges, which is what GitHub has today. If the owner wants outbound, limit it to state (closed or reopened) on the issue a task came from, per project, off by default, from a machine identity, and never comments: a private task thread must not leak into a public issue.
- Native de-duplication: reuse
task_upsert_by_external_refwith a reserved system for native findings (no schema change, but "external" is overloaded), or add adedupeKeyand atask_reporttool (clean, one migration). - Duplicates across forges when a repository's issues are migrated or mirrored: an explicit per-project source list and a refusal, not fuzzy matching on titles.
- Where a person files a new issue: either forge or Tale. Tale-native tasks are never published, so a person who wants a public issue files it on GitHub.
Acceptance
- A run reports the same finding twice and gets one updated task; the run made no request to GitHub or Forgejo (asserted on the connector calls and the sandbox egress).
- The Forgejo import passes the same tests as GitHub's: cursor resume after an interruption, refresh of linked tasks, and an issue missing upstream becomes unavailable and is never deleted or completed.
- No path gives a task two bindings or writes to a forge: the connector list has no write verb, and a repository configured on two forges refuses to import into one project without the explicit setting.
- The cycle's declarations carry no instruction or grant to create forge issues, and the manager's full pass imports GitHub and Forgejo sources through the same cursor and receipt pattern (ideally the intake step in Improvement: build the fleet manager's admission, dispatch and recheck lessons into the platform, and shrink its automations #4945).
Out of scope
- Syncing GitHub and Forgejo with each other, or publishing a native task to a forge.
- Pull request and review objects (only issues), GlitchTip intake (unchanged), and the independent-review rules.
Related
#4945 (the intake step this would use)
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Rule: Tale is the hub, and this version is inbound only. GitHub and Forgejo issues flow into Tale tasks through
task.sync_issues. Nothing flows back to a forge, and nothing flows from one forge to the other. Agents report findings as native tasks through a newtask_reporttool, keyed by afindingKeythat is unique per project. A native task is never published.Answers to the forks
task_reporttool and afinding_keycolumn with a partial unique index per project. A task holds a finding key or an external binding, never both. Onlytask_reportsets the key.owner/repoand its kind. The check runs when a step is saved and again at run time (ISSUE_SOURCE_DUPLICATE_REPOSITORY, nothing written, other sources go on). Saved sync positions are not used, because they hash the kind and the connection and outlive removed sources.sameRepositoryElsewhere: trueexempts a source. No fuzzy matching. The TASK-R66 example gets the flag.The Forgejo issue source already exists on main (TASK-R64 to TASK-R66). The autonomous cycle's briefs and token rights change in the private ops repository.
Finding semantics: the server fills in the reporting agent and run. Severity maps once, at creation, to priority (critical p0, high p1, medium p2, low p3). A report carries up to 20 evidence references. A re-report updates last-seen, the count and the provenance, adds one evidence comment, and never changes the title, description or priority. Done reopens to todo as a regression only when the revision differs from the one recorded at close. Cancelled stays cancelled. Archived is left unchanged. A key is matched only among the tasks the run may touch: a confined run's subtree, or what a served board's starter may read. A match outside that scope is never written or revealed. The report makes no connector call and no egress.
Rationale: a path with no outbound verb, held by a test, is the only structural guarantee that a finding never reaches a public tracker. Confinement has to hold for the key too. A key of its own keeps findings from acting like externally bound tasks. The duplicate check rests on what the project declares now, resolved to real hosts, so it neither refuses by mistake nor misses a clash. Leaving cancelled findings alone and bounding regression reopens means repeated agent scans cannot undo a person's triage.
Implementation units (base: main)
task_reportsandbox tool, with zero connector calls and zero egress asserted, confinement tests, docs and locales (M; after 1).Cross-issue amendments (decisions taken together with #4994):