Repository navigation
fix(server): prefer origin for repository identity - #156
Conversation
Agent work on this PREstimated cost unknown · 0 responses · 17 sessions · 4.3 h wall time (whole sessions)
Flags: 4 large tool outputs · 8 permission requests · 16 sessions with usage bound to no task · 1 session without usage records Details: snapshot, prices, coverage, counters
Token counters by model (native counter semantics; never added across semantics): Selected rates (USD per million tokens). These rates value the report at the selected schedule date; they do not establish historical prices or subscription spending.
Other output and reasoning are priced without double counting inclusive native output. Missing rates remain unknown. Local measurement from native records; usage totals are not billing. Updated in place by |
|
Agent Observer publication succeeded: #156 (comment). Measurement gap: the published snapshot reports estimated cost unknown, 0 attributed responses, evidence incomplete, and native session usage or worker ownership unavailable. These are measurement limitations, not zero usage or a publication failure. No complete cost estimate is claimed. |
|
What Independent review found no actionable issues in the exact two-file diff. ReviewVerdict: success. Base: The resolver now checks Consumer impact checked against the source:
Both resolver files already have fork ownership and allowlist entries. I inspected the supplied exact-head proof artifacts: resolver tests 12/12, targeted typecheck and lint exit 0, and the pre-fix run shows the two mixed-remote assertions failing while the other 10 pass. I did not rerun checks. The Agent Observer publication succeeded; its existing PR note states attribution is incomplete and cost is unknown, so no completeness claim is made. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
What Repository identity now prefers origin, with upstream as its next fallback.
Why A fork with both remotes previously defaulted project operations to upstream.
So what All proof and independent review passed; this PR is ready for the human merge decision.
Closes #155. Changes only the preferred remote tuple and its behavioral tests. All other fallback order, parsing and caching remain unchanged. Existing fork ownership and allowlist entries cover both files, so metadata edits are unnecessary. This keeps Promachos and Drafter work attached to the project's own repository.
Requirements and who asked: User requested origin-first identity, unchanged remaining fallback, mixed-remotes and upstream-only tests, source dependency assessment and exactly one PR.
Deleted: No configuration, abstractions, consumer edits, version bump or metadata changes.
Bottleneck: The resolver preference tuple owns this behavior; exact-head proof and independent review gate delivery.
Checked myself: Inspected the complete two-file diff, real-Git regression results, PR lookup and Issue consumers, and existing fork ownership/allowlisting.
Proof at
0d1b13eeeb3577957fe4bfe5d28db9eb0a6331f5, base187b86dd86fbc0fce5d3de23f6fb8f4d06a74344:pnpm exec vp test run apps/server/src/project/RepositoryIdentityResolver.test.ts: exit 0, 12 passed. With updated tests before the implementation, exit 1, 2 mixed-remotes cases failed and 10 passed because upstream still won.pnpm exec vp run --filter t3 typecheck: exit 0. Existing Effect suggestions elsewhere in server code were emitted, with no errors.pnpm exec vp lint apps/server/src/project/RepositoryIdentityResolver.ts apps/server/src/project/RepositoryIdentityResolver.test.ts: exit 0.git diff --check: exit 0. Commit hook formatting preserved the tested diff exactly (cmpsucceeded).Dependency assessment, source inspected without consumer edits:
requireProjecttreats hostless references as the project's own repository and rejects mismatches. Origin-first therefore moves default PR enumeration and hostless validation to the fork. Hosted references explicitly route by host/repository, retaining cross-repository routing with existing provider constraints. Previously hostless upstream refs can now fail the own-repository check; explicit hosted refs are the supported route.project.repositoryIdentityandsourceControlRepositorySelector, deduplicating by host/repository. The fork is now enumerated and deduplicated rather than upstream; GitHub-only support remains unchanged.{ refresh: true }invalidates both root and identity cache entries. This change does not migrate persisted links or force immediate refresh of client snapshots.Independent review passed on the exact head: findings, no actionable issues, GPT-6-Luna on Codex routed by Prism. The newest
review/independentstatus issuccess, created by authenticated accountlukemajat 2026-10-04T19:48:32Z and targeting those findings. All source CI checks passed. Agent Observer publication succeeded; measurement remains incomplete with estimated cost unknown, 0 attributed responses, and native session usage/ownership unavailable. This is a measurement gap, not zero usage or publication failure. Durable handoff contains the branch, worktree, proof and remaining state. Website impact: none, server repository selection only. No browser/live-service checks, repo-wide checks, version bump, merge or installation performed.Implementation: GPT-6.1-Sol (
gpt-6.1-sol), medium effort, Codex harness in T3 Code.