Skip to content

Improvement: agents report findings as native tasks, and GitHub and Forgejo issues sync with Tale but never with each other #4946

Open

Description

@yannickmonney

Summary

Two connected changes to where work enters the platform:

  1. 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.
  2. 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: github and glitchtip (ImportedIssue.externalSystem). Connectors: *.list_import_issues, *.get_import_issue, *.refresh_import_issues; starter automations github-import-issues and glitchtip-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 from taskExternalIssueSchema.
  • 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) and task_upsert_by_external_ref (idempotent on (externalSystem, externalId), dedupeScope of org or project), both in backend/core/node_only/sandbox/workspace_tools_bridge.ts (:266, :399).

Proposal

A. Native finding intake

  • Roles that find things hold task_create and 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, a forgejo-import-issues starter automation, credentials and base URL in settings, the same cursor, receipt and "unavailable, never deleted" semantics. external_system is forgejo, and external_id is 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)

  1. 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.
  2. Native de-duplication: reuse task_upsert_by_external_ref with a reserved system for native findings (no schema change, but "external" is overloaded), or add a dedupeKey and a task_report tool (clean, one migration).
  3. 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.
  4. 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

  1. added
    needs discussion
    improvement
    service: platform
    on Oct 13, 2026
  2. yannickmonney commented on Nov 14, 2026

    @yannickmonney
    ContributorAuthor

    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 new task_report tool, keyed by a findingKey that is unique per project. A native task is never published.

    Answers to the forks

    1. Outbound sync: no. If it is ever wanted, it gets its own issue (per project, off by default, machine identity, state only, never comments).
    2. Native de-duplication: a dedicated task_report tool and a finding_key column with a partial unique index per project. A task holds a finding key or an external binding, never both. Only task_report sets the key.
    3. Duplicates across forges: an explicit refusal based on the declared sources of the project's enabled sync steps. Each source is resolved to its host (github.com, or the Forgejo connection's instance origin), its lower-cased owner/repo and 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: true exempts a source. No fuzzy matching. The TASK-R66 example gets the flag.
    4. Where a person files an issue: on either forge or in Tale. A public issue is filed on the forge.

    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)

    1. Native findings: the finding key, provenance, per-state handling, scope-bounded matching, the migration and spec rules from TASK-R87 on (M).
    2. The task_report sandbox tool, with zero connector calls and zero egress asserted, confinement tests, docs and locales (M; after 1).
    3. The issue sync refuses the same repository from two hosts in one project, based on resolved declarations, with the flag, the error code and an updated TASK-R66 (M).
    4. A guard test that the sync and finding intake reach only read-effect operations, plus a spec rule (S; after 2).

    Cross-issue amendments (decisions taken together with #4994):

  3. added
    agent-ready
    and removed
    needs discussion
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyimprovementservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions