Skip to content

feat(projects): GitHub refs on project tasks — read path, MCP fields, task modal (abilityai/trinity-enterprise#1240) - #4490

Merged
vybe merged 5 commits into
devfrom
feature/1240-task-external-links
Nov 12, 2026
Merged

vybe merged 5 commits into
devfrom
feature/1240-task-external-links

Conversation

@vybe

@vybe vybe commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes abilityai/trinity-enterprise#1240

What

Platform half of abilityai/trinity-enterprise#1240: a project task can show the GitHub issues and pull requests its work lives in. The links are read-only.

  • GitHubService.get_issue: a generic issue/PR read. It follows one redirect, and only on the API origin. Error text carries the exception type, never a token.
  • MCP: refs on create_project_task, and refs_add / refs_remove on update_project_task. No new tool. Every description stays under the length guard.
  • Frontend: a GitHub refs block in the task modal (ProjectTaskRefs.vue), store and utils, and a read-owners field in Settings (ProjectsGithubReadOwnersSetting.vue).
  • Docs: docs/user-docs/sharing-and-access/workspace-projects.md.
  • The enterprise submodule pin moves to 6925b6e, the tip of abilityai/trinity-enterprise#1243, which builds on a03a9d3.

Review + security

  • The reading review asked for one fix here: issue reads now refuse a redirect off the API origin (ee7a4b5ad), with a test that no second request is sent.
  • /cso --diff: nothing at ≥8/10. No dependency, workflow or Dockerfile changes.
  • The raw-color ratchet passes and the baseline file is unchanged.

Tests

  • Shuffled sweep, all green: test_1240_github_get_issue, test_4165_*, test_4284_exception_text_sites, test_ent1117_s10/s12, test_2107_push_access_probe and test_ent109_repo_binding. Neighbour order is green too.
  • vitest: workspaceProjectsEnt1240.mount.spec.js and workspaceProjectsUtils.spec.js, 25 passed. projects.test.ts, 32/32 under node --test.
  • The fix step ran the route-census guards and reports them green. CI runs the full island.

Before merge

  • This PR merges together with abilityai/trinity-enterprise#1243, which is where the pin points.
  • dev was merged in at 0ee2d15b0. The tree is unchanged, and the branch is 0 behind.

🤖 Generated with Claude Code

Trinity Agent (trinity) and others added 4 commits November 12, 2026 00:01
…task tools (abilityai/trinity-enterprise#1240)

Checkpoint B (platform). GitHubService.get_issue: one GET to
/repos/{o}/{r}/issues/{n} over a bounded client (5 s, one redirect),
GitHubError carries status, reset and rate_limited; network errors never
carry httpx's text. create_project_task gains refs, update_project_task
gains refs_add/refs_remove, and both now forward only the keys they
declare.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ore and docs (abilityai/trinity-enterprise#1240)

Checkpoint C (platform).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…yai/trinity-enterprise#1240)

C1: GitHubService.issue_client adds a request hook that raises GitHubError
(status None -> the refs read records "unreachable") when a redirect hop's
scheme, host or port differs from API_BASE's, before that hop is sent, so
the platform token never leaves the API host.

I2: the Projects GitHub owners setting says removing an owner stops new
reads and titles already read stay as last read.

Bumps src/backend/enterprise to 6925b6e (C2 + I1).

Tests: test_redirect_to_another_origin_is_refused_before_it_is_sent and
test_redirect_changing_scheme_or_port_is_refused[x2] — red with the hook
removed, green restored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s 6925b6e, on top of a03a9d3)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vybe vybe added the ui PR touches the frontend UI — triggers Playwright e2e tests label Nov 12, 2026
@trinity-ability

Copy link
Copy Markdown
Contributor

PR Validation Report

PR: #4490 — feat(projects): GitHub refs on project tasks — read path, MCP fields, task modal
Branch: feature/1240-task-external-links → dev · tip 0ee2d15b0 · 14 files (+874/−33)
Lane: C (the enterprise submodule pin moves). No schema change in this repo.

Summary

Category Status Notes
Commit messages ✅ conventional feat/fix/merge
Base branch ✅ dev
PR size ✅ 14 files
Status auto-promotion 🔧 There is no closing keyword. The one issue named is cross-tracker abilityai/trinity-enterprise#1240; the other ref is a PR. This run was report-only, so the body is not patched: add Fixes abilityai/trinity-enterprise#1240 at merge. That issue is cross-tracker, so set status-in-dev on it by hand after the merge.
Journey Impact ✅ check_journey_impact.py exits 0. It passes but warns that the body declares no Journey Impact line.
Requirements / architecture ➖ This repo gets a service read helper and UI only. The feature's requirements live with the paired PR.
Feature flows ➖ The user doc is updated (workspace-projects.md).
Security greps (§4.1–4.10) ✅ Only the test placeholder token hits. No emails, IPs, env files, host paths or mode changes, and no deleted test lines. The enterprise-docs guard has 0 hits on added lines.
Infrastructure / build / config packaging ➖ No Dockerfile, compose or new top-level package. No new os.getenv.
Audit rows (§4.11) ➖ audit_rows.py: no gated write handler touched
Structural review ✅ /review and /cso --diff ran in the chain. Its one platform-side fix (redirect origin lock) is in ee7a4b5ad.
Merge gate ✅ Every check on the tip is terminal and green: Tier 1 including regression diff and pytest (head, seed 12345). For lane C, journey-smoke and the frontend-e2e run (e2e) also passed on the PR. dev-ci is success on dev and no dev-ci red issue is open.
Test adequacy ✅ Non-happy paths are covered: 404, rate limit, 403 vs a refusal, network error with no token in the text, a second redirect, and off-origin, scheme and port redirects.
Cross-surface drift (§5.5) ✅ No router changed and github_service.py has no agent-server twin. The MCP tool moves with the paired backend fields: projects.ts refs / refs_add / refs_remove.
Code quality ✅ / ⚠️ See suggestions
Product fit ✅ The issue is status-ready, not incubating. Scope matches: read-only refs, MCP fields, task modal and admin owners field. The tier extends a module that is already entitlement-gated (isEntitled('projects') at Settings.vue:1039). The capability is not on record in the tier table (⚠️, not a finding).
Product bar 7–11 ✅ UI, MCP and docs all ship together. The settings help text states that titles already read remain after an owner is removed.

Execution coverage (§5.4)

changed symbol / test executed by live consumer verdict
GitHubService.get_issue, issue_client tests/unit/test_1240_github_get_issue.py (15 pass, MockTransport) the paired PR's ref reader ✅
GitHubError(reset, rate_limited) same file (rate-limit / 403 / 429 tests) same ✅
MCP createTaskParams / updateTaskParams / declared projects.test.ts (32/32, node --test) create_project_task, update_project_task ✅
ProjectTaskRefs.vue, store, projectsUtils.refHref, ProjectsGithubReadOwnersSetting.vue workspaceProjectsEnt1240.mount.spec.js (jsdom mount) + utils spec ProjectTasks.vue:153, Settings.vue:1039 ✅

Mutation (this run): I removed the same_origin request hook from issue_client. Three tests went red: test_redirect_to_another_origin_is_refused_before_it_is_sent and both test_redirect_changing_scheme_or_port_is_refused cases. I restored the file, confirmed it byte-identical by sha256 with a clean tree, and the file is back to 15 passed.

Cross-surface drift (§5.5)

line printed answer
none printed —

Issues found

Critical: none.

Warnings

  • Add Fixes abilityai/trinity-enterprise#1240 at merge, then bump that issue to status-in-dev by hand (it is cross-tracker).
  • This PR must merge together with abilityai/trinity-enterprise#1243. The pin 6925b6e is that PR's current head, which I confirmed against the API.

Suggestions (non-blocking)

  • ProjectsGithubReadOwnersSetting.vue calls api directly rather than through a store (Invariant Feature/process engine #6). 12 of 33 components in components/settings/ already do this, so it follows local precedent.
  • ProjectTaskRefs.vue uses raw gray classes (the ratchet allows them). The design-system contract prefers semantic tokens for new code.
  • get_issue interpolates owner/repo into the path unchecked and relies on the caller's charset check. The same-origin hook bounds the host either way. A local check would make the helper safe on its own.

Recommendation

APPROVE. Merge it together with abilityai/trinity-enterprise#1243.

Not run here (the chain's evidence sweep already covered them, or they were left to CI on purpose): the full unit island, the pinned-guard suite, and a live GitHub read, which is an operator step.

PR #4490 — APPROVE — merge gate: ✅ · run chain-ent1236-1240-validate-oss

@dolho

dolho commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Reviewed together with the enterprise half; findings are on abilityai/trinity-enterprise#1243 (review of 6925b6e + this PR at 0ee2d15). Two touch this repo: the task-modal copy and refs_add description (findings 1 and 4 there). Nothing blocking in the platform half itself.

…rnal-links

# Conflicts:
#	src/backend/enterprise
#	src/frontend/src/stores/projects.js

@trinity-ability trinity-ability left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated (/validate-pr, lane C): Tier 1 + journey-smoke/e2e green after dev merge + pin to ent main 888233b (ent#1243 merged). Follow-ups noted in report.

@vybe
vybe merged commit a080d6c into dev Nov 12, 2026
28 checks passed
trinity-ability pushed a commit that referenced this pull request Nov 12, 2026
Conflicts resolved keeping both intents:
- src/mcp-server/src/tools/projects.ts: #4490's shared createTaskParams /
  updateTaskParams + declared() filter now carry every ent#1232 param
  (todo status, parent, blocked_by, blocked_by_add/remove, for_person,
  the done-without-claim note); both descriptions carry the ent#1232
  rules and REFS_RULE, each under 2048 chars.
- projects.test.ts: both describe blocks kept; the ent#1240 "drops
  undeclared keys" case uses priority (status is declared on create now).
- workspace-projects.md: both sections (GitHub issues and PRs before
  Subtasks, waiting and tasks for people).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants