Milestone 10 — GitHub synchronization and completion
Status: COMPLETE and merged. PR #31 delivered M10; hosted checks, exact-head independent review, and protected merge passed. The prompt was archived after acceptance. Live GitHub App acceptance remains an explicitly recorded operational limitation because no App credentials or authorized test repository were provisioned.
Refreshed implementation baseline
At M10 implementation start on 2026-10-23, git fetch origin confirmed origin/main at 7c984daacbdf1868ade363bf74b90635f1580632. M8 implementation PR #27 merged at 26a0c712bf00256eec0ee0e3a436fcda8cc46937; its prompt archive/index PR #28 merged at e00df182dbd6259fda219dcbd37fd298c881ead3. M9 implementation PR #29 merged at 7b24b7c0e388811dc9d2df28481112e2f25cbdb0; its archive/index PR #30 merged at the then-current origin/main SHA. Prompt 8 was byte-for-byte archived at planning/archive/completed/08-web-ag-ui.md. At that checkpoint, the planning index marked M8 and M9 complete and M10 active, and implementation began on codex/milestone-10-github based on the M9 archive merge.
Implemented at this checkpoint
- Added GitHub App configuration, installation and explicit repository opt-in records; organization-admin actor mapping; scoped installation tokens; and permission/connection reporting. App and webhook secrets are stored as opaque references and are forwarded only to the API and worker services in Compose.
- Added bounded raw-body HMAC verification and a transactional PostgreSQL webhook inbox/outbox with delivery uniqueness, lease/retry processing, and authenticated repair controls.
- Added inbound issue-to-interview creation for labeled, opted-in issues from mapped operators; structured question/revision-bound answer comments; authoritative issue edit reconciliation; and revocation handling for installation/repository removal. An edit arriving before the opened webhook reads the current issue through the repository-scoped installation token, creates from that state only for a mapped sender, and makes a subsequent stale opened payload an idempotent replay. Tracked edits surface title/body conflicts against the synchronized baseline.
- Added durable, stable-key issue-comment effects and exact-base review-branch/PR publication from the verified local Git revision. Publication checks for an existing PR/branch after ambiguous outcomes and records remote PR identity and head data. Completed check-run/check-suite events trigger fresh PR-head and check-run queries before recording the required-check set; a stale head is ignored.
- Added durable, stable-key outbound issue creation and commit-status effects. Issue creation searches bounded issue pages for its correlation marker after ambiguous writes and stores the resulting GitHub object ID/number. Commit-status effects reconcile the latest status for a task context before writing, and reject stale task-version intents.
- Added a five-minute bounded poll of up to 25 tracked, opted-in PRs/installation records to recover missed PR/check/review and installation/repository-access webhooks. It refreshes each PR and current required-check set, reconciles newly observed mapped review states, rechecks installation grants and repository availability, records exact-head merge evidence only after fresh checks and current mapped approval evidence, and returns an unmerged closed or drifted PR to bounded remediation when attempts remain. A merged PR whose head differs from the reviewed head remains explicitly unverified and is not automatically retried. A separate bounded issue scan pages through open issues with each opted-in repository's topic label using a persisted page checkpoint; each candidate's current state is fetched before import and the mapped creator must still pass the existing project authorization check.
- Added a durable post-integration worker for archive finalization, optional learning outcome, and cleanup. The archive outcome is bound to the verified bundle digest/head and merge revision; cleanup removes only the exact Harnessa candidate ref and owned interview workspace; a task reaches
DONEonly after archive and cleanup succeed and learning has a terminal outcome. The learning outcome is recorded as skipped because no project learning hook is configured in M10. - Added repository-level
pre_mergeandpost_mergearchive policies. The default keeps archive changes in the reviewed implementation PR.post_mergeexcludes those paths from that PR, creates an archive-only maintenance PR on the current default branch after verifying it descends from the integration SHA, persists its identity and head as a tracked sync object, and holdsDONEuntil current required checks and the verified maintenance PR merge are recorded. Closed or drifted maintenance PRs fail visibly and require an authorized operator retry; the PR URL and step state are available through the integration-evidence read API. - Added an authenticated GitHub status/repair UI and the GitHub App setup guide, Compose configuration, environment examples, and compatibility notes.
Offline validation
uv run ruff check apps/api tests scripts: passed after outbound effects and polling updates.uv run mypyon the changed API, adapter, database, processor, and worker modules: passed after outbound effects and polling updates.uv run pytest tests/test_specifications.py tests/test_github_app.py tests/test_api_auth.py tests/test_contracts.py tests/test_review_head.py -q: 65 passed; one existing Starlette/httpx deprecation warning. Coverage includes bounded closed-unmerged recovery, effective and authorized latest review state, archive evidence binding, exact-ref/workspace cleanup ownership and idempotency, head/base drift classification, and ambiguous issue/status effect reconciliation.- With
TEST_DATABASE_URLpointing at the disposableharnessa_testdatabase andTEST_REDIS_URLat Redis database 7,uv run pytest tests/integration -q: 62 passed using PostgreSQL 16.13 and Redis 8.10.2. The post-integration route case automatically finalized archive evidence, skipped the unconfigured optional learning hook, removed cleanup artifacts, and reachedDONEonly after the required steps succeeded. A local HTTP fake additionally exercised post-merge archive PR creation, durable status visibility, current required-check reconciliation, verified PR merge, and task completion. pnpm lint && pnpm typecheck && pnpm typecheck:design-system: passed.pnpm --filter @harnessa/web exec vitest run --environment jsdom tests/workspace.test.tsx: 17 passed, including GitHub health rendering and repair submission.pnpm --filter @harnessa/contracts typecheck: passed after regenerating OpenAPI TypeScript definitions from the local FastAPI schema.uv run mypy --strict --follow-imports=silent apps/api/harnessa: passed (65 source files).uv run alembic upgrade head --sqlfromapps/api: emitted migration SQL with the post-integration skipped terminal outcome.uvx --with-requirements requirements-docs.txt mkdocs build --strict --site-dir /tmp/harnessa-m10-site: passed.uv run alembic headsfromapps/api: one head,f3b8c9d1a012; offline migration SQL emitted successfully, including durable GitHub rate-limit retry times for tracked PRs, installations, and opted-in repositories. The newer M10-R2 migration and one-head check are recorded below.docker compose -f infra/compose.yaml config -q: passed.git diff --check: passed.-
On 2026-10-23,
pnpm testpassed against disposable PostgreSQL 16.13 and Redis 8.10.2: 248 API unit tests (one skipped), 62 integration tests, 28 web tests, 2 cloud-portal tests, the marketing build and static artifact check. The strict 85% line/statement coverage gate passed for all packages: API 85.08%, web 92.46%/85.07%, UI React 100%, cloud portal 96%/98.86%, UI Svelte 100%, and aggregate 85.40%/85.29%. This run includes durable retry scheduling, the full local fake acceptance path, and a signed edit-before-open webhook regression that verifies current issue state is used and a stale opened event cannot replace it. Environment versions: Python 3.12.15, uv 0.13.1, Node 24.22.1, pnpm 10.34.7, PostgreSQL 16.13, and Redis 8.10.2; integration used a disposableharnessa_m10_testdatabase and Redis DB 7. No GitHub App credentials or live integration writes were used. -
After M10-R2 recovery coverage was added,
pnpm testpassed against disposable PostgreSQL 16.13 and Redis 8.10.2: 248 API unit tests (one skipped), 62 integration tests, 28 web tests, 2 cloud-portal tests, marketing build/static check, and the strict 85% coverage gate. The latest full run reported API line/statement coverage 85.07%; aggregate was 85.40%/85.28%. The GitHub acceptance fixture covers a 100-item bounded page and persisted page advance/reset, a topic issue recovered without any webhook inbox receipt, idempotent replay, mapped-creator enforcement, pull-request/invalid candidate rejection, malformed list response, rate-limit retry, and forbidden/removed repository access handling.pnpm lint,pnpm typecheck, strict mypy across all 65 API source files, strict MkDocs build, Alembic offline SQL generation with one head (4a2d8c91e735),git diff --check, and the focused migration check also passed. All testing used disposable services; no GitHub App credentials or live integration writes were used.
The Browser Harness opened /workspace/github and confirmed the route/navigation renders. The local API was not running on port 8010, so browser-backed live API behavior was unavailable; the authenticated view and repair flow were verified in the web test instead.
Live integration limitations
The local fake-backed acceptance test completes the full issue → interview/answer → review bundle → GitHub review PR → mapped approval/current checks → verified merge → post-merge archive maintenance PR → verified maintenance merge → cleanup → DONE flow. It uses a temporary local Git repository, disposable PostgreSQL/Redis, replayable signed webhook fixtures, and an httpx GitHub API fake. The run also verifies duplicate/replayed deliveries, unauthorized/stale answers and reviews, failure-triggered bounded recovery, PR identity/head/base drift, and rate-limit retry deferral for PR, installation, and repository resources. No real GitHub App, installation, secret values, or disposable GitHub repository were configured; live App/repository evidence remains a deployment follow-up, separate from local acceptance. No project learning hook is configured, so that optional outcome is recorded as skipped.
Review and protected merge acceptance
- Implementation PR: #31, reviewed final head
91ff56cb5329673203528fc457f64f6f505c18d4, merged tomainas5b78b4ce3cc98723da40f70e0f1dcebc4a8bf476on 2026-10-23. - Independent exact-head review of implementation commit
4cbac360abc41d4922e860865b5ffdf04bb25abafound no actionable findings and verified the accepted R1/R2 fixes and full prompt scope. A fresh exact-final-head re-review of91ff56cb5329673203528fc457f64f6f505c18d4also found no new actionable findings; its only delta was the coverage-number correction in this report. All review threads were resolved. These were reviewer comments, not formal approvals. - Required hosted checks passed on the final head: Local CI (push run
39932489376, 4m25s; pull-request run39932497559, 4m39s), CodeQL (Python and JavaScript/TypeScript analyses passed), and Documentation build. The deployment job was skipped by workflow conditions. Protect mainwas active with Local CI and CodeQL required, review-thread resolution required, zero mandatory approvals, last-push approval disabled, and no bypass actors. Copilot auto-review remained enabled; its monthly quota was exhausted, so no formal GitHub approval was submitted. No protection bypass was used.- PR #31 was merged only after the final head, checks, ruleset, and resolved threads were refreshed. Prompt 10 was then moved byte-for-byte to
planning/archive/completed/10-github.md, and the planning index was updated to mark M10 archived complete.
M10 is complete. Stop here; milestone 11 remains active and has not been started.