PR target correction — owner instruction
This child is implemented from and merged into codex/epic-200-git-backed-harness, NOT main. Keep one issue branch / one PR, independent exact-SHA review and required head + resulting epic-branch CI. Record acceptance as integrated into the epic, not released. The full branch goes to main only through the single final #200 PR after all #201–#207 and integrated gates are complete. See #200 delivery-contract comment; this supersedes the original child main-merge wording, leaving title/description fixed.


G3 implementation contract, based on green epic merge 3e4de8363e6f9ca4b8d62db1845b4d11fac1c94d; issue branch codex/issue-203-local-git-hosting, target only codex/epic-200-git-backed-harness.
Use global service.mode: local and bounded local_projects bindings (backend, project_id, opaque storage_ref, configured local ref, read-only policy; optional RAG profile reserved for the separate child). For the MVP, storage_ref resolves deterministically to a dedicated managed bare-store location in the user configuration area. No arbitrary store path/URL crosses IPC, no new enrollment/ownership database or journal. Initialization of the registered service uses an already valid G1/G2 Git repository; product CLI initialize/register is #204.
Add a small shared-service LocalProjects facade over G1/G2 and LocalProjects status/get/list/history/mutate methods on existing private JSON-RPC. Canonical aliases share the same store; inconsistent project/ref aliases are rejected. Per-project status is content/path-free and shows readable/read-only and last conflict diagnostics (ephemeral observation, not authority). Git receipts remain the only durable operation evidence.
Existing Manager.Run gets an early strict-local branch before maintenance, remote jobs/provider, credential reporter, RAG setup or Admin creation. Existing state/socket lifecycle and RPC handler cancellation/join are reused; local requests are single-connection, bounded and cancel on disconnect. Unknown selector/method/misrouting is a finite typed error, never remote fallback. TCP/cohosting/implicit Admin is rejected. No OS-level zero-network certification claim.
Verification: real temporary Git store through actual Unix IPC, create/read/update/history, context cancellation, shutdown/restart and same-key replay, canonical alias/ref mismatch/read-only policy, invalid/unknown requests and sanitized status/errors, plus poison credential/provider sources proving local startup never enters those graphs. Focused race, full Go, docs/whitespace, independent exact-SHA review and head/resulting epic CI before closure. CLI/MCP product actions remain #204, search #205 and protected explicit Admin cohort #206.


G3 candidate at 02353f4f1536ae3503437fd86a4e68a27a0933c2, tree 19a64420deabe08a87088350a3ed4b6d8cc86af9, base green epic merge 3e4de8363e6f9ca4b8d62db1845b4d11fac1c94d.
Implemented the small shared-service facade and existing-daemon/private-IPC branch over G1/G2. Global opaque bindings resolve a managed Git store; canonical aliases share runtime/writer authority and inconsistent identity/ref aliases are rejected. Config/read-only/unknown-route diagnostics are finite; status has no paths/content. Registered project identity is checked inside the mutation writer lane, not only in preflight. Strict-local startup bypasses credentials, remote maintenance/jobs/providers and Admin; TCP/live intent/redirected control socket/implicit Admin are rejected. No new database, coordinator, ownership/recovery ledger, storage schema or OS sandbox. CLI/MCP domain actions remain #204, search #205 and explicit protected Admin #206.
Passed on this code: go test ./...; go test -race ./internal/localgit ./internal/service ./internal/servicectl; focused LocalProjects race twice; config/main/CLI poison-credential startup controls; focused vet; product-doc checker; whitespace gate. Actual Unix IPC + real temporary Git tests exercise create/get/list/update/history/health, read-only and canonical alias routing, strict bad requests, cancellation while Git candidate commit is in flight, joined shutdown, fresh restart + same-key original replay, and safe retry without consuming a durable ID after prepublication cancellation. Existing remote/cache daemon regressions are retained; an initial normal-cache configuration regression was corrected rather than changing those tests.
Earlier overlapping full/race attempts had real Git fixture startup/read failures; their cause was not conclusively established. They are recorded as failed, not passed. Complete final gates above subsequently passed, with no deleted regression or relaxed invariant. Independent exact-SHA review and required head/resulting epic CI are still pending. No acceptance/release claim yet.


Independent review reproduced two P2s on exact 02353f4f1536ae3503437fd86a4e68a27a0933c2 (private actual-Git/memory and malformed-result controls failed, 1.538s):
- Accepted memory local hosting returned from daemon stop while an admitted mutation still owned a blocked Git process; caller cancellation was needed afterwards to join it. Fix must bind request cancellation to daemon lifetime and join admitted memory work through existing IPC ownership primitives.
- A
LocalProjects.Mutateresult{}could acknowledge success for reused typed and discarded destinations; Get accepted unknown result fields. Fix must validate fresh method-specific result DTOs even when discarded, reject incomplete/unknown result data, replace caller destinations atomically, and classify malformed sent-mutation replies as same-key publication ambiguity.
Head CI 38618074108 is terminal success (all 18 steps) for the reviewed initial head, but it does not override these findings or qualify a later fix SHA. PR remains unmerged; fixes, retained regressions, fresh review and CI follow. No route is being removed to avoid the lifetime bug.


Independent review of 02353f4f1536ae3503437fd86a4e68a27a0933c2 finished with exactly three P2 findings (REVISE): memory-route daemon shutdown did not join admitted Git work; incomplete/unchecked result bodies could acknowledge writes; repo-owned local_projects alone bypassed origin refusal. No additional P0–P2 was found. The first two were reported earlier; the third is now included here.
All three fixes and retained deterministic regressions are implemented locally. Focused actual Unix/Git, memory shutdown/restart, malformed result, and config tests passed under race: go test -race ./internal/servicectl ./internal/config -run 'TestLocalProjects|TestLocalProjectConfig' -count=1. Also reject null read-only configuration rather than interpreting it as writable. Full gates are running; the corrected commit still requires a new independent exact-SHA review and CI. The initial green CI does not qualify the changed code. PR !195 remains unmerged and targets only the epic branch.


Corrected commit pushed: 2d03771c537e67f1ad4c0a0a56a14e70e49d5047 (tree e6f7f0108dc4dc1dfde56a63289df76e86550182), PR !195 → isolated epic branch only.
All three P2 fixes are retained with deterministic regressions. Final passed commands: go test ./...; go test -race ./internal/localgit ./internal/service ./internal/servicectl ./internal/config -count=1 (servicectl 120.179s); final go test -race ./internal/servicectl -run TestLocalProjects -count=1 (6.741s); affected go vet; ./scripts/check-product-docs.sh; git diff --check. Independent re-review requested on the complete base-to-head range; mirror 3349 triggered once for exact-head CI, observed by a read-only Luna watcher. Neither gate is yet declared clear.


Second review confirmed all original fixes but found one remaining P2: Status accepted nonfinite diagnostic/conflict strings, malformed commit IDs and a null read-only boolean. Fixed narrowly with a closed wire DTO, required booleans, canonical identity/OID grammar, finite diagnostics and state consistency; retained actual private-peer negative and positive controls.
Final candidate: ff734b60dd3852cb7198301920595f095f4902ce, tree 611c48f6a6c9e7cf018cfc3833500b60c2c2ea37. Passed final go test ./... (qualification 96.779s, servicectl 51.331s), focused G3 race (6.848s), affected vet, product-doc contracts and whitespace. Complete affected-package race already passed for the underlying lifecycle corrections. New independent exact-SHA review requested and mirror triggered once for new-head CI. Superseded 2d03771 cannot qualify merge. PR !195 remains isolated from main.


Independent final exact-SHA review: SOURCE CLEAR for ff734b60dd3852cb7198301920595f095f4902ce; no remaining P0–P2. All four original reviewer findings were rerun unchanged, together with retained actual Unix/Git, memory shutdown, config and startup controls under -race -count=3 (servicectl 14.304s, config 1.385s, LocalGit 2.672s, CLI 1.835s, main 2.854s). Applicable vet, documentation, whitespace and all 22 changed-file byte comparisons passed.
Reviewed tree 611c48f6a6c9e7cf018cfc3833500b60c2c2ea37; cumulative base-to-head patch digest 76af40bb760315783745e9a59b3a9043ec71ed41ed8cdead95fd83e7dfff9437. Exact-head CI run 38621978675 remains separately required. No merge or closure yet; no whole-epic/main acceptance is claimed.


Final pre-merge gates satisfied for exact reviewed ff734b60dd3852cb7198301920595f095f4902ce: CI 38621978675, attempt 1, job 116051524484 completed/success, all 18 returned steps success including native user-systemd qualifier. Root independently read terminal run/jobs evidence in addition to the Luna watcher. Canonical PR head/base check confirmed exact head and unchanged epic base; fresh discussion refresh returned zero unresolved threads. Independent SOURCE CLEAR is recorded above. Merging only into codex/epic-200-git-backed-harness; resulting integration CI is still required before child closure. No main merge or release.


Completed G3 via PR !195, merged ONLY into the isolated epic branch at 3c6b0f7df9199e461e27480efe2cfbbfb3731e0b (parents: previous epic base 3e4de8363e6f9ca4b8d62db1845b4d11fac1c94d and reviewed head ff734b60dd3852cb7198301920595f095f4902ce). Result tree 611c48f6a6c9e7cf018cfc3833500b60c2c2ea37 is identical to the independently reviewed/tested source.
Final head review: no remaining P0–P2; all four original reviewer regressions and retained controls passed race ×3. Full local Go tests, affected races, vet, docs and whitespace passed. Exact-head CI 38621978675, attempt 1/job 116051524484, and resulting integration CI 38622855818, attempt 1/job 116054491585, completed successfully, all 18 steps including native user-systemd qualifier. Fresh premerge discussions: zero unresolved; canonical head/base verified. Root independently checked terminal CI evidence. Live issue refresh confirmed original title/body unchanged.
Acceptance covered by real Git/private Unix and memory tests: registered initialization, typed read/write/history, canonical alias/read-only routing, cancellation/join, restart and exact original receipt replay; malformed/misrouted calls fail typed without remote fallback or status content/path leakage. Strict-local startup bypasses credentials/providers/remote maintenance/Admin. No storage authority outside Git was added. Epic #200 checkpoint updated before closure. CLI/MCP product commands (#204), search/RAG (#205), protected Admin (#206) and integrated backup/restore gates (#207) remain separate required work. Main unchanged; no release claimed.


Epic #200. Reviewed design: #145 comments 193818947 and 193819865. One issue = one small PR; independent exact-SHA review, applicable local gates, required head/main CI. Existing GitCode behavior is unchanged. No authoritative SQLite, Git–SQLite journal, new daemon/storage/vector engine or native launcher.
Dependencies: #202 (G2).
Clean replacement for cancelled #183. Host the G1/G2 adapter through existing daemon lifecycle, private IPC and shared service contracts. CLI-only registration resolves opaque storage_ref; clients use an opaque project selector. Reuse current locking/cancellation/status primitives, not a new coordinator framework.
Strict-local hosting stays outside the remote maintenance/provider startup graph: no GitCode provider construction, credential discovery, remote cohosting or implicit Admin HTTP. Explicit loopback Admin remains a later separate opt-in cohort, not a zero-network claim.
Acceptance: initialize registered project service, read/write via private service boundary, cancel an in-flight request, restart and replay a published receipt. Misrouting/unknown project/invalid configuration returns typed errors; no remote fallback. Status exposes readable project/read-only/conflict availability without paths or content leakage. Two aliases of a store cannot create independent writers.
Non-goals: any new storage schema/engine, search/RAG rebuild, migration/quarantine/ownership ledger, CLI/MCP product commands, Admin or OS-level sandbox. Demo: running existing daemon serves a real Git data repository and restarts safely.