Review artifact: approved-source synchronization for PRD #2995
Task: #4234. This is a proposed canonical edit, not evidence that the live issue was edited. The coordinator applies only the independently reviewed text. No runtime, flag, provider, credential, dependency, held design or existing producer/UI is changed.
Selected classification — source amendment v1.5
The founder selected the previously published Option B: “Use v1.5 for the
approved source amendment (recommended); V7 stays held.” The coordinator's
decision relay 6286422932
records the exact answer and response reference
request_user_input_async / call_772ed1b95ca0457aa9fd56df2f0c6b58 / question0.
It is a bot-authored disclosure of the authenticated-session instruction, not a
User-authored GitHub comment. Independent review still assesses the exact text.
The selected change follows registry policy “minor = new requirement”: canonical
proposal and mirror **Version** headers become 1.5, and only #2995's registry
version cell becomes 1.5. The old v1.4 dated-addendum exception (Option A) was
not selected; no general exception is introduced. LLD §11 does not itself
imply or forbid a version bump; the founder's separate version ruling supplies
the authority here.
Held §17 and its registry paragraph remain byte-for-byte unchanged. An explicit note outside that held text states: v1.5 records the approved GitHub source amendment only. The old V7 proposal's v1.5 label is historical; V7 remains held and receives its version only at its own approval. No v1.6 assignment or V7/D13 approval follows. §17 remains mirror-only and is not copied to canonical; §18 keeps its number for cross-reference parity. The historical Draft status/date and all other original PRD bytes remain unchanged; neither implementation of all base requirements nor activation is claimed.
For audit, the concrete alternatives before the choice are preserved at review head 942c95c. No live canonical write was performed by this author. Coordinator application, concurrent-edit refusal and exact readback still gate #4234 closure.
Evidence and provenance
- Founder approval 6223177614,
upsqdvb(User), updated 2026-10-16T19:32:57Z, says “Approved” in response to the complete consolidated request 6221254416, updated 2026-10-16T17:41:08Z. Read together: approval binds foundation §§3–6 at #4152 head4d700ec215b6700b0a05787e6af884e94f9c6531, not unspecified later scope. - Accepted foundation at that head; merged #4152
c6de4792676e23d3603a0c5d9f9a696452387230. Its old “proposed” header is historical. It is not edited by this PR. - Merged LLD §11 explicitly assigns this separate synchronization and preserves activation/rollback gates. §§8–10 supply the detailed implementation and verification contract.
- PushContext relay 6284654455,
upsquad-project-manager[bot](Bot), updated 2026-10-20T06:11:37Z, records the founder's in-session “Use the recommended restriction.” It is not a founder-account comment. Policy is selected; execution proof is still required. - Coordinator primary-session disclosure 6285594458 supplies the exact compatibility question and founder answer, “Use the recommended restriction”, with response reference
request_user_input_async / call_8285c1f33aec4a7a91ce734a3a3e40d2 / question0. This is evidence of the already-granted session authorization, not a User-authored GitHub comment; review must assess that disclosed provenance. No repeated product-policy approval is requested. - Founder version decision relay 6286422932 records the exact Option B session answer and response reference above; source-only v1.5 is selected, not a v1.4 exception or V7 approval.
- #3678 delivery ledger, read at its 2026-10-20T06:52:09Z update, supplies the dated implementation evidence. This documentation task ran no runtime experiments and does not upgrade that evidence into composed acceptance.
Requirement delta inventory
The original canonical body, with only its approved version header changed from 1.4 to 1.5, is preserved byte-for-byte as the proposed body's prefix. Original quotations below are locators, not substitutes for reading the whole clause. AS identifiers refer to mirror §18.
| Original clause / current text | Delta, exact source and authority | Proposed text | Implementation / verification / activation |
|---|---|---|---|
US-10 / TK-8.8: list_repos, get_repo_map, get_repo_activity, search_code; TK-8.9: “A governed checkout remains the primary instrument for deep code work.” | Foundation §3 adds bounded remote path-list/find/read through existing agents. Neither path matching nor a full tree is content inspection; C6 remains binding. | AS-1, AS-4 | G1/G2 landed; G3 agent tools incomplete. No search/index or full-workspace acceptance. |
| NG-9: “Repo maps are not ACL objects.” No signed runtime source authority is specified. | Foundation §§3–4 and approval request item 1 add the distinct trusted-runtime claim and exact service/session boundary. Old map visibility/provenance stays separate. | AS-2 | G1 scoped witnesses landed; deployed full-runtime/source-hop proof remains incomplete. |
| TK-3.1/3.2/3.5: team credential, declared scope, no fallback; TK-3.9: no captured ACL is “outside M2's scope.” | Foundation §4 / request item 2 applies those boundaries to explicit GitHub team source enablement. One-repository App mint; honest PAT limitation. No new M2 success claim. | AS-3 | Grant/acquisition foundation landed; UI/report and composed access checks remain acceptance work. |
| TK-8.1 / NG-9 name GitLab; §14 retains GitLab acceptance. | Foundation §1 / LLD §8 G4 selects GitHub-first beta delivery. GitLab obligations remain deferred, not silently deleted or satisfied. | AS-10a | GitHub partial implementation; original two-provider wave remains open. |
| TK-8.3: complete listing plus bounded sampled excerpts; TK-8.7: staleness accompanies map reads. | Foundation §§3/5 distinguishes complete bounded inventory from inspection; source evidence is commit-pinned with explicit re-pin/freshness and per-release authority. | AS-1, AS-4, AS-5 | G1/G2 scoped proof, not continuously current observation or automatic refresh. |
| TK-8.3 tool-less v1 producer; source bytes not retained after run. | Foundation §2/§5 preserves default-vs-hard sample distinction; §§3–6 add a separate governed source tool path without changing signed producer policy. | AS-5, AS-8 | Existing producer retained. No producer retirement, model/tool-policy change or persistent source/index approval. |
| F2/F4/F6 corpus storage/fetch/index requirements; no source-session R1 exception in the base. | Foundation §6 / request items 4–5 permits retained excerpt history but excludes marked/resumed sessions from extraction/export; serializes explicit-remember refusal with first source. | AS-6 | G3 retention PR open; actual exporter/runtime composition incomplete. Not a new ingestion route or retrospective erasure promise. |
| Base has no rule for legacy agent PushContext source-session provenance. | Later relay 6284654455 selects verified CE runtime refusal while enforcement ON, including unmarked sessions and source-OFF rollback. Ordinary human/external access preserved. | AS-7 | In-session choice confirmed by exact question/answer disclosure 6285594458; independent provenance review remains pending, not a repeated policy request. Real adapter/SQL/side-effect/guard-removal proof still pending. |
| TK-7.7 reporting / F8 management plus retained shipped map controls. | LLD §8 G4 requires both management surfaces, authoritative metadata, disclosure and truthful pending TK-3.7 report; existing agents query. | AS-9 (engineering obligation) | Client #951 landed/deployed; metadata #4220 and exact API/stub/composed follow-up remain. No hidden map-body fetch or authorization copied client-side. No shipped-surface removal. |
| §14 / #3681 wave acceptance; no full-source G1–G4 proof in old text. | Foundation §7 / LLD §§8–11 engineering acceptance (not founder-approved product requirements) require real GitHub journey, both runtimes/frontends, negative cases, cleanup, and ≤300-second rollback. | AS-10b (engineering obligation), delivery-state table | Outstanding. Flags OFF; issuer #4222 unresolved. UI/partial-proof success is not delivery. |
| Mirror §18 / registry at 2026-10-16 say “awaiting joint security/HLD approval.” Canonical has no §18. | Founder 6223177614 resolves that gate; LLD §11 requires exact canonical/mirror/registry synchronization. | §18 disposition/changelog; registry approved-source section | This PR proposes canonical text. Task remains open until coordinator applies and verifies it. |
| Mirror §17 / registry V7 proposes v1.5 and D13 trial; canonical before body is v1.4. | Foundation/LLD do not approve V7/D13. Founder version ruling 6286422932 separately selects source-only v1.5. | Selected classification + exclusions | Preserve §17 and V7 registry paragraph byte-for-byte; old proposed numbering is historical, future V7 number assigned only at its own approval. |
Exact canonical application contract
The public diff below is the complete proposed canonical change. It changes
exactly the base **Version**: 1.4 header to **Version**: 1.5, then adds one
newline followed by the exact new mirror §18. It deletes/rephrases nothing
else in the base. Decode GitHub JSON .body as Unicode
and hash its UTF-8 bytes without adding a file newline. Newlines in the appendix
are LF. Apply from the reviewed PR commit, never a moving branch.
- Before writing, the coordinator fetches live #2995 body and
updated_atvia its own bot REST. Require both to equal the before receipt below. A mismatch is a concurrent edit: refuse the write, reconcile the exact new delta and obtain review; do not strip whitespace, replace the whole issue with the mirror, or silently overwrite intervening work. Recheck immediately before the PATCH; if the service supports conditional writes, use them. REST GET/PATCH is not an atomic compare-and-swap, so inspect immediate readback and the issue timeline for an overlapping edit; any ambiguity stays unresolved, not “synced.” - Apply only this reviewed diff to that exact before body. Require the resulting hash/byte count below, then submit that body. No labels, title or other issue fields change. The original body's bytes with only that single authorized header replacement must remain an identical prefix; held §17 is not copied into canonical.
- Read back the live issue and compare body hash, selected version 1.5, appended text and original prefix with only the authorized version-header change. Compare the same §18 in the landed mirror and registry classification. Record canonical before/after timestamps/hashes, actual landed repository SHA and exact review head on #4234; link the result on #3678.
- Only then can #4234 close. A merged mirror PR or approval of this proposal alone is insufficient. Canonical application is owned by the coordinator, not this author.
{
"issue": 2995,
"updated_at": "2026-10-14T20:36:54Z",
"body_sha256": "caa44258c7dc9387b2e2a9133b493a99261324ae93b552d5acbaeb098869622d",
"body_bytes": 97334,
"url": "https://github.com/upsquad-ai/upsquad-core/issues/2995",
"proposed_body_sha256": "87d2b62f00e090fa89618e2e0d9fe37d7dffd5f0dae0d2d37e85442b71f915f7",
"proposed_body_bytes": 112549,
"append_sha256": "6c62a41114a8fe3dafcfd4d2b6b2a7d0c39c35a11d8e80a911b10abedaf7a7ba",
"authorized_base_change": "Exactly one **Version**: 1.4 \u2192 **Version**: 1.5 header replacement"
}
--- canonical-2995.before.md
+++ canonical-2995.proposed.md
@@ -4 +4 @@
-**Version**: 1.4
+**Version**: 1.5
@@ -604,0 +605,88 @@
+
+## 18. Approved-source amendment — GitHub foundation (2026-10-20)
+
+**Disposition:** the bounded GitHub source contract is approved; implementation,
+verification and activation are separate gates. The founder's
+[approval 6223177614](https://github.com/upsquad-ai/upsquad-core/issues/3680#issuecomment-6223177614)
+ratifies [request 6221254416](https://github.com/upsquad-ai/upsquad-core/issues/3680#issuecomment-6221254416):
+PR #4152 at `4d700ec215b6700b0a05787e6af884e94f9c6531`, foundation §§3–6.
+The [accepted foundation](https://github.com/upsquad-ai/upsquad-core/blob/4d700ec215b6700b0a05787e6af884e94f9c6531/docs/design/repository-source-github-foundation.md)
+merged as `c6de4792676e23d3603a0c5d9f9a696452387230`; its historical
+“proposed” wording records its pre-approval state, not a still-open approval gate.
+The independently reviewed [LLD](https://github.com/upsquad-ai/upsquad-core/blob/301938b3489f53b9ffa67c0492f82e9f59d9630c/docs/design/repository-source-github-lld.md)
+merged as `301938b3489f53b9ffa67c0492f82e9f59d9630c` and supplies G1–G4
+verification. The later, narrower PushContext decision is AS-7 below.
+
+**Version decision:** the founder selected **v1.5 for the approved source
+amendment; V7 stays held**, recorded with exact authenticated-session provenance
+in [decision relay 6286422932](https://github.com/upsquad-ai/upsquad-core/pull/4235#issuecomment-6286422932).
+That relay is bot-authored, not a founder-account GitHub comment. The v1.4
+dated-addendum exception was not selected. **v1.5 records this GitHub source
+amendment only.** The old V7 proposal's v1.5 label is historical; V7 remains held
+and receives its version only at its own approval. Its text and registry paragraph
+remain unchanged; no V7/D13 approval or v1.6 assignment is inferred.
+
+The [synchronization review](https://github.com/upsquad-ai/upsquad-core/blob/main/docs/prd/team-knowledge-approved-source-sync.md)
+contains the exact canonical proposal, requirement delta and concurrency check.
+Until the coordinator applies that independently reviewed text to #2995, the
+mirror/registry correction is not completion of canonical synchronization.
+The original PRD's wording and historical status are unchanged apart from the
+explicitly selected version header and appended amendment. This is not a claim
+that every base requirement is implemented or that source activation is complete.
+
+### Requirements, engineering obligations and claim boundaries
+
+The source column distinguishes founder-approved product policy from retained
+base requirements and engineering acceptance obligations. LLD/foundation §7
+verification details are not promoted into founder-approved product requirements.
+AS-7 records the later in-session choice with disclosed provenance; independent
+review of that record remains required. A bot relay is not described as a
+founder-account GitHub comment, and this document does not re-request the choice.
+
+| ID | Obligation / relation to the base PRD | Source and authority |
+| --- | --- | --- |
+| **AS-1 — Agent experience** | Existing agents use governed remote `list_repository_paths`, `find_repository_paths` and `read_repository_file` calls, without a mandatory whole-map/graph download. `find_repository_paths` matches paths, **not file contents**; this slice does not deliver `search_code`, semantic navigation, a general checkout or complete repository understanding (TK-8.8/8.9, C6). A complete bounded manifest inventories entries; it does not prove every file was read or understood. Maps remain orientation, never an access grant. | [Foundation §3][foundation], ratified by [request/approval][approval]: approved source-tool contract; TK-8.8/8.9/C6 retained, not discharged. |
+| **AS-2 — Session and service authority** | The new signed `runtime_session_id` comes from the trusted runtime, survives the approved exchange and is revalidated against the active exact org/team/public-agent/session relationship, resolving configuration ownership. Quad provenance and MCP transport session IDs are not authority. Knowledge MCP uses the exact approved certificate URI SAN on the context-engine source hop; current authorization is checked per call and before releasing results, including cache hits. Pins are selectors, not read leases. This is separate from map visibility and ordinary human management authorization. | [Foundation §§3–4][foundation] and [request item 1][request], ratified [approval][approval]: founder-approved new authority boundary. |
+| **AS-3 — Team source grant** | Registration alone grants nothing. Use explicit team source enablement, the team's vaulted connection, declared repository scope and governed provider egress; no org/platform/environment credential fallback. GitHub App minting narrows to one repository. PAT scope acknowledgement is not proof of complete remote scope inventory. The tenant claim is **“team-enabled repository access”**: eligible team agents can read permitted paths through that connection, not per-user GitHub ACL parity or corpus-ingestion permission. Name GitHub source homes **outside M2 coverage** in the TK-3.7 report; do not weaken M2 or silently include them in its denominator. | [Foundation §4][foundation] and [request item 2][request], ratified [approval][approval]; base TK-3.1/3.2/3.5/3.7/3.9 retained. |
+| **AS-4 — Evidence and freshness** | Return repository/commit/path/line evidence for reads and bounded manifest/pagination status for listing. Refuse unsafe paths, symlinks/submodules and disallowed secret/binary content; redact before result/history persistence. Report `current`, `behind` or `unknown` with observation time; unknown freshness is not current and uncertain permission is denial. Explicit re-pin discloses changed commit. Credential/binding/grant changes invalidate old authority; revocation blocks new reads. An observation does not promise continuous branch polling or automatic map regeneration. | [Foundation §§3–5][foundation], within [approved §§3–6][approval]: bounded evidence, pin/path/freshness contract. |
+| **AS-5 — Acquisition and storage** | Accepted profile: ≤10,000 entries / 8 MiB manifest; ≤16 KiB / 200 lines per read result; ≤30 seconds / 12 total wire attempts per operation; ≤80 attempts / 16 MiB per runtime session; ≤25% of the shared installation window; separate 64 MiB source-buffer and 64 MiB metadata-cache bounds. Foundation sublimits also bind pages, blobs, concurrency and cache lifetime. These are policy limits, **not measured capacity, RSS or paid-evaluation approval**. Source bytes are ephemeral; no persistent raw-source store/index is authorized. Retained excerpt history is the explicit AS-6 exception, not ingestion. Measured container/concurrency enforcement remains an activation prerequisite per the ratified request; cleanup/rollback witnesses are AS-10b engineering obligations. | [Foundation §5][foundation] and [request finite-limits item][request], ratified [approval][approval]: approved finite profile, not measured capacity. |
+| **AS-6 — R1 and memory** | Bounded excerpts may enter tenant-approved model routing and ordinary conversation/checkpoint/context/audit records under existing retention. Previously delivered history remains usable after revocation; no backup/provider-erasure promise. Repository-bearing sessions, including resumed sessions, are excluded from automatic memory extraction **and corpus export**. Explicit `remember` is refused for marked sessions, serialized with first-source marking. The marker commits before source release; enqueue, worker, final persistence and the actual exporter must enforce the boundary, including races/already queued work. No prior-memory or unrelated-history deletion is authorized. | [Foundation §6][foundation] and [request memory/R1 paragraphs][request], ratified [approval][approval]: approved retention boundary. |
+| **AS-7 — Legacy PushContext** | The founder selected the narrower restriction recorded in [relay 6284654455](https://github.com/upsquad-ai/upsquad-core/issues/3680#issuecomment-6284654455): while runtime-session enforcement is ON, legacy PushContext refuses **verified platform context-engine runtime credentials, even for unmarked runtime sessions**. Use verified authentication provenance, never caller-supplied session/agent IDs or unverified JWT fields. Preserve ordinary human/external principals and existing context/history. Refusal survives source-tools OFF / enforcement ON rollback; enforcement OFF compatibility remains. This relay records an in-session founder decision, not a founder-account comment. Implementation and real gateway → Connect → SQL insert/update refusal proof, zero side effects and guard-removal RED/restored GREEN are still required. | [Relay 6284654455][pushcontext] plus [primary-session disclosure 6285594458][session-decision]: explicit founder answer with the exact question/response reference; both GitHub records are bot-authored. Independent review of this disclosed provenance remains required; no repeated policy approval is requested. |
+| **AS-8 — Producer compatibility** | The existing generated-map producer remains tool-less and governed by its signed v1 policy. Its default sample (32 bodies / 8 KiB excerpts) differs from hard ceilings (48 bodies / 16 KiB per file / 512 KiB total); neither means full-repository coverage. New agent source tools do not relax that policy or turn the producer into a tool-using session. Retain curation locks, provenance, human denials and legitimate existing map tools. This amendment authorizes **no retirement or deletion** of the shipped producer, its management UI or historical map data. Future indexing is a separate decision. | Base TK-8.3/8.4/8.5 and [foundation §3 preservation][foundation] retained. Default/hard numbers are existing-policy evidence in foundation §2, not new policy approval. Foundation §7 preservation reiterates existing obligations. |
+| **AS-9 — Management** | New source management covers connection/access/freshness/recovery in **both Next portal and Vite SPA**, with existing agents as the conversation surface. It adds no separate repo agent, human map/graph viewer or curation UI. Use authoritative metadata/status without hidden map-body downloads. Before enablement show team-sharing disclosure; preserve server authority/private-key gates, epoch-safe changes and truthful OFF/denied/expired/stale/error states. Attach the outside-M2 report; if TK-3.7 reporting is unavailable, display “coverage report pending” and include it in composed acceptance rather than inventing a reporting RPC. These new-direction non-goals do not remove existing shipped surfaces. | **Engineering acceptance obligation ([LLD §8 G4][lld]), not a founder-approved product requirement.** Existing F7 server authority remains; this does not authorize retirement. |
+| **AS-10a — Bounded first scope** | GitHub is first on beta-dev; GitLab and its unmet acceptance remain deferred, not delivered. Disposable Upsquad GitHub fixtures are authorized; existing business repositories remain read-only. | [Foundation §3][foundation] bounded GitHub slice and [ratified request][request] fixture/exclusion paragraphs; historical sequencing in foundation §1 is not approval of its excluded work. |
+| **AS-10b — Composed acceptance** | G1–G4, both runtimes/frontends, authenticated `:10443` connect → disclosure → enable → list/find/read → refresh/re-pin → revoke → new-read refusal with prior-history retention → remove → reload, truthful size/freshness/permission failures, audit/cleanup evidence and measured ≤300-second rollback must pass. Unit tests, a partial harness or deployed UI alone cannot close #3465/#3681 or the broader wave. | **Engineering acceptance obligation ([LLD §§8–11][lld] / [foundation §7][foundation]), not a founder-approved product requirement.** These are implementation verification gates, not proof of delivery or fresh activation authority. |
+
+[foundation]: https://github.com/upsquad-ai/upsquad-core/blob/4d700ec215b6700b0a05787e6af884e94f9c6531/docs/design/repository-source-github-foundation.md
+[lld]: https://github.com/upsquad-ai/upsquad-core/blob/301938b3489f53b9ffa67c0492f82e9f59d9630c/docs/design/repository-source-github-lld.md
+[request]: https://github.com/upsquad-ai/upsquad-core/issues/3680#issuecomment-6221254416
+[approval]: https://github.com/upsquad-ai/upsquad-core/issues/3680#issuecomment-6223177614
+[pushcontext]: https://github.com/upsquad-ai/upsquad-core/issues/3680#issuecomment-6284654455
+[session-decision]: https://github.com/upsquad-ai/upsquad-core/pull/4235#issuecomment-6285594458
+
+The accepted foundation §§3–6 and LLD §§8–11 retain their exact engineering
+limits and witnesses; this summary does not replace their omitted sublimits.
+F2/F4/F6 corpus storage, retrieval and indexing obligations remain distinct:
+remote excerpts do not implicitly become corpus ingestion, embeddings or RAG.
+No new graph database, Graphify selection, persistent source/index retention,
+paid engine evaluation, new provider host, GitLab activation, production rollout,
+D13 large-repository experiment, milestone-37 work or V7/D13 approval follows.
+
+### Delivery state — observed 2026-10-20, not acceptance
+
+The [dated delivery ledger](https://github.com/upsquad-ai/upsquad-core/issues/3678)
+records the evidence and remaining dependencies:
+
+| Boundary | Implementation / verification state | Activation / acceptance state |
+| --- | --- | --- |
+| Foundation and LLD | Approved contract, merged #4152 / #4155; source decisions above are resolved. | Design approval is not enablement or runtime proof. |
+| G1 authority and G2 acquisition/deployment | G1 #4166/#4172/#4176 and G2 #4182/#4189 merged with independent review and scoped proof; G2b deployed OFF. | Source and runtime-session-enforcement switches remain OFF. No authenticated end-to-end claim. |
+| G3 retention/export/runtime tools; AS-7 | Retention PR #4224 is open; exporter/recovery and Knowledge/both-runtime integration remain incomplete. PushContext policy selected; required implementation/proof pending. | R1 composition and real agent source access are not accepted. |
+| G4 metadata and management UI | Core metadata PR #4220 remains open. Client #951 merged and deployed to both dev frontends with scoped browser/mutation evidence; client#890 remains open for exact merged-core metadata/stubs and composed acceptance. | A rendered interface is not a successful authenticated source journey. |
+| Whole journey / rollback | #3465/#3681 composed GitHub proof and ≤300-second rollback remain outstanding; private source-issuer/custody readiness #4222 remains unresolved. | No activation, whole-wave closure or retirement is authorized by this documentation sync. |
+
+**Changelog (v1.5 — approved source amendment):** records the 2026-10-16
+consolidated founder approval, 2026-10-20 PushContext choice and explicit v1.5
+version ruling; corrects the old §18/registry pending-source-approval claim.
+All other v1.4 requirements, held §17 V7/D13 text, historical evidence and unrelated
+requirements are retained. V7's old proposed version label does not grant approval.