Skip to content

PRD 4173 M4, continued: finish routing, intake, agent rendering and the two M3-approval preconditions #13

Closed

Description

@MirceaTufanDev

Continue M4 of PRD 4173 (prds/4173-external-issue-trackers.md). An earlier run was interrupted; its committed work is already on this branch. Read the PRD's M4 section and its Decision Log (DL-1 to DL-6) first, then the code. No step touches .github/workflows/**.

Already on this branch (do not redo; verify, then build on it)

  • m1 Decision Log entries DL-1 to DL-6 and the owner answers.
  • m2 migration 00425_issue_tracker_repo_link.sql: marker trigger, issue-number guard, link columns, issue_key; the recorded-call golden for unlinked repos.
  • m3 link service, the D13 gates, delete refusal, minimal API routes, server wiring.
  • m4, units 1 and 2 owner-scoped issue source per repo, the M4 write guard, the linked MR lane; run creation, schedules, lifecycle and the worker issue routes go through the issue source. The review of unit 2 was in progress: re-review 98560507..HEAD before continuing.

What remains

  1. Rest of m4. Whatever of this list is not yet done: the handler sync dispatcher; the skip classifier for a moved issue (lifecycle, MR watcher, PRD patch); the skips for Projects sync, autopilot and self-improve; the poller split; the collision test (two connections exposing the same project number) and the privilege and claim tests.
  2. m5 intake. Linked sync, issue_key, the linked assessment (D11), the sweep selector, the claim issue_key; acceptance tests 1 to 3 and 8.
  3. m6 agent. Rendering with the issue key (Related to ABC-12., no forge closing keyword), with Vitest.
  4. m7. The E2E sweep over e2e/phases/, e2e/lib.sh, e2e/lib.test.sh and e2e/forge-fake/; a changelog fragment; the M4 status in adr/4173-issue-tracker-seam.md; the final PRD update; the evidence run.

Two preconditions from the maintainer's M3 approval (mandatory)

Add both to the M4 acceptance in the PRD before any further M4 code, then implement them.

  1. Intake does not depend on a tag-name search. ListIssues asks YouTrack for tag: {name} and then filters by the stored tag id. That is correct only if a name search returns the issues of every visible tag with that name, which is unverified. Switch intake to a listing scoped by the eligibility tag's id (the issues of that tag, filtered to the driver's project on the client), and make the YouTrack fake serve it. Keep the filter by stored id. Document in the PRD the fallback when an id-scoped listing is not possible: intake walks the whole project, up to the listing ceiling. State in the PR that the id-scoped listing follows YouTrack's documented shape and is confirmed on a real instance in M6.
  2. ListLabels agrees with what the driver can use. It returns every visible tag name today, so CheckRepoLabels can report as present a label this driver cannot list issues by or remove. ListLabels returns only the eligibility tag and the tags owned by the connection's account. Add a contract case with a foreign same-named tag.

Also keep the two notes already in the M4 acceptance: issue tracker text gets the same bounds and fencing as forge text (issueinput), and a reconnect cannot change the account of a connection with a linked repo.

Wording

Write "issue tracker", never the bare word "tracker". No real hostnames, logins or tokens anywhere.

Disk

The earlier run stopped because build caches filled the worker's data volume. Do not run the full task gate:api or the full task test:api; run go test -race -count=1 on the affected packages only, and clear the Go build and test caches (go clean -cache -testcache) after each milestone.

Acceptance

The M4 acceptance in the PRD, as written there, including the two preconditions above.

Evidence

The in-run boundary of AGENTS.md "Run economy": task check:api, go test -race -count=1 on the affected packages with each new regression test watched red then green, task test:issue-tracker-forge-fake-contract, task test:forge-fake, task test:e2e-lib, check:changelog-entry, check-docs:web, check:migration-numbering, check:token-literals, and task scan:secrets with its canaries-detected line.

Activity

  1. MirceaTufanDev commented on Nov 13, 2026

    @MirceaTufanDev
    CollaboratorAuthor

    Superseded by #15. The run on this issue was lost after a worker host reboot; its work (checkpoint ef044d46) was saved as branch 4173-m4-part2 and merged into prd/ws-2 in #14. The rest of M4 continues in #15.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions