> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_38/session_10_hunk_reconciliation_and_release_gate.md).

# Session 10: Hunk Reconciliation and Release Gate

**Session ID**: `phase38-session10-hunk-reconciliation-and-release-gate` **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Prove the manual semantic port is complete across every upstream changed path.

***

## Non-Negotiable Delivery Bar

The phase is not complete until every upstream changed path and every modified file hunk has a disposition, every shipped feature is proven through real execution, visible result, recovery path, and tests, and final docs do not overclaim unimplemented behavior.

***

## Source Items

* Completeness audit.
* Hunk-by-hunk reconciliation.
* Final lint, build, targeted tests, docs sweep, security checks, and browser evidence where relevant.

***

## Scope

### In Scope (MVP)

* For each modified upstream file, extract relevant patch hunks and record each hunk as `ported`, `already-present`, `superseded`, `skipped-resolved-policy`, or `skipped-n/a`.
* For every `superseded` entry, name the AI OS replacement file by absolute path.
* For every `skipped-resolved-policy` entry, name the resolved policy.
* Re-run the changed-path ledger against implementation and confirm all 39 upstream paths have a disposition.
* Run tier-level and whole-repo verification, including lint, build, targeted tests, docs sweep, security checks, and relevant browser checks.
* Preserve the hunk reconciliation record next to Phase 38 artifacts or in the PR description.

### Out of Scope

* Reopening resolved owner decisions.
* Adding new feature scope not present in Phase 38.
* Treating unimplemented features as documented success.
* Deleting evidence before the reconciliation record is committed or attached.

***

## Required Disposition Statuses

Use only these statuses:

* `ported`
* `already-present`
* `superseded`
* `skipped-resolved-policy`
* `skipped-n/a`

Every `superseded` disposition must include the absolute AI OS replacement path. Every `skipped-resolved-policy` disposition must name the resolved decision from the Phase 38 PRD.

***

## Changed Path Coverage

All 39 upstream paths are in the Phase 38 PRD ledger. Confirm final disposition for each:

* `.claude/launch.json`
* `.githooks/pre-commit`
* `CHANGELOG.md`
* `CLAUDE.md`
* `INTEGRATION.md`
* `LICENSE`
* `README.md`
* `docs/intelligence-view.md`
* `docs/local-voice-setup.md`
* `package.json`
* `scripts/aggregate.ts`
* `scripts/graph-to-dashboard.sh`
* `scripts/install-dream-cron.ts`
* `scripts/platform.ts`
* `scripts/run-dream.ts`
* `scripts/seed-data.ts`
* `scripts/setup-graphify-brain.sh`
* `scripts/setup.ts`
* `scripts/webp-file-type-art.sh`
* `src/components/agent-core-3d.tsx`
* `src/components/hermes-mind-3d.tsx`
* `src/components/intelligence-portal.tsx`
* `src/components/oracle-plasma.tsx`
* `src/components/oracle-rider.tsx`
* `src/components/oracle-sonar.tsx`
* `src/components/oracle-waveform.tsx`
* `src/components/stage-aurora.tsx`
* `src/components/stage-cosmos.tsx`
* `src/lib/mind-map.ts`
* `src/lib/synthetic-voice.ts`
* `src/routes/agents.hermes.tsx`
* `src/routes/index.tsx`
* `src/routes/memory.tsx`
* `src/routes/setup.tsx`
* `vite.config.ts`
* `voice-lab/.env.example`
* `voice-lab/README.md`
* `voice-lab/index.html`
* `voice-lab/server.ts`

***

## High-Risk Modified Files

Feature-level reading is not enough for these large diffs. Extract and reconcile each hunk:

* `vite.config.ts` +826 upstream lines, patch line 6506.
* `src/routes/index.tsx` +397 upstream lines, patch line 5840.
* `scripts/install-dream-cron.ts` +219 upstream lines, patch line 1002.
* `scripts/aggregate.ts` +196 upstream lines, patch line 548.
* `src/routes/setup.tsx` +156 upstream lines, patch line 6323.
* `src/routes/agents.hermes.tsx` +113 upstream lines, patch line 5472.

Example extraction:

```bash
awk 'NR>=6506 && NR<7661' \
  /home/aiwithapex/projects/claudeos/claude-os-v2.7_to_v2.8.1.full.patch
```

For added files, read the whole v2.8.1 file directly and record whether it was ported, superseded, or skipped.

***

## Mandatory Verification

* Run `bun run lint`.
* Run `bun run build`.
* Run targeted unit/integration tests for each changed area.
* Run docs sweep for removed upstream endpoints and stale claims.
* Run security checks relevant to loopback, token, Host-header, body-size, path safety, provider key handling, and voice broker CORS/origin behavior.
* Run cross-platform checks or faithful harnesses for Windows-specific aggregate, scheduler, setup, and CLI resolution behavior.
* Run macOS/Linux regressions for aggregate, scheduler, and existing bridge behavior.
* Run browser proof for dashboard Dream generation and Intelligence voice where credentials and environment allow.
* Check the Suggested Test Checklist in `/home/aiwithapex/projects/claudeos/claude-os-v2.7_to_v2.8.1_diff_findings.md`.

***

## Prerequisites

* [ ] Sessions 01 through 09 completed.
* [ ] Every upstream changed path is mapped to implementation, supersession, or resolved-policy disposition.
* [ ] Final docs are updated enough for stale-claim sweeps to be meaningful.

***

## Deliverables

1. Complete changed-path disposition table for all 39 paths.
2. Hunk-by-hunk reconciliation record for every modified upstream file.
3. Superseded mapping with absolute AI OS replacement paths.
4. Documented resolved-policy skips.
5. Final verification results for lint, build, targeted tests, docs sweep, security checks, cross-platform checks, and browser proof.
6. Any exact non-port blockers documented with cause and owner.

***

## Success Criteria

* [ ] Every changed path has one required disposition status.
* [ ] Every modified-file hunk has one required disposition status.
* [ ] Every `superseded` item names the AI OS replacement file by absolute path.
* [ ] Every `skipped-resolved-policy` item names the resolved policy.
* [ ] `bun run lint` and `bun run build` pass, or failures are documented with exact causes unrelated to the port.
* [ ] Targeted tests cover all changed behavior and recovery paths.
* [ ] Final docs and product surfaces do not claim features that are not implemented and proven.
* [ ] The old ongoing-projects port plan can be deleted without losing Phase 38 implementation detail.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_38/session_10_hunk_reconciliation_and_release_gate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
