|
| 1 | +# PR Merge Runbook — Truth Kernel Branches |
| 2 | + |
| 3 | +Purpose: deterministically open and merge our three current branches using either the GitHub UI or the repo’s helper script. This file is the canonical reference for future threads. |
| 4 | + |
| 5 | +## Branches |
| 6 | +1. **PR 1** (audit fix) → `fix/audit-hyphenated-identifiers` → `main` |
| 7 | +2. **PR 2** (node test runner) → `test/node-runner` → `main` |
| 8 | +3. **PR 3** (docs) → `docs/truthlens-readme-status` → `main` (after rebasing on merged PR1+PR2) |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Option A — GitHub UI (simplest) |
| 13 | +1. Open each “Compare & pull request” link for the three branches. |
| 14 | +2. Titles/Bodies: |
| 15 | + - PR 1 — **Title:** `fix(audit): ignore code blocks; tighten pronoun detection` |
| 16 | + **Body:** Refines simulation detection to skip fenced/inline code and avoid hyphen/underscore-bound identifiers. Adds unit tests. |
| 17 | + - PR 2 — **Title:** `test: switch to Node built-in runner; convert audit tests` |
| 18 | + **Body:** Replaces Mocha semantics with node:test. Updates package.json test script. Ensures zero-deps test execution in CI. |
| 19 | + - PR 3 — **Title:** `docs: TruthLens runtime + audit; compliance quick checks; Codex workflow` |
| 20 | + **Body:** README adds TruthLens + CI gate overview; STATUS adds compliance quick checks; TruthLens policy page gains canonical pointers. |
| 21 | +3. Labels: |
| 22 | + - PR 1: `truth-kernel`, `audit` |
| 23 | + - PR 2: `tests`, `truth-kernel` |
| 24 | + - PR 3: `docs`, `truth-kernel` |
| 25 | +4. Merge order: |
| 26 | + - Merge PR 1 → Merge PR 2 → Rebase `docs/truthlens-readme-status` on `main`, then open & merge PR 3. |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## Option B — Helper script (no gh CLI) |
| 31 | +**Prereq:** create a GitHub Personal Access Token (repo scope). Export it in your shell: |
| 32 | +```bash |
| 33 | +export GITHUB_TOKEN=<YOUR_REPO_SCOPED_TOKEN> |
| 34 | +``` |
| 35 | +Run these commands from the repo root (Ubuntu). |
| 36 | + |
| 37 | +### 1) PR 1 — audit fix |
| 38 | +```bash |
| 39 | +node tools/gh-pr-open-and-merge.cjs \ |
| 40 | + --repo mrhpython/Soulfield \ |
| 41 | + --base main \ |
| 42 | + --head fix/audit-hyphenated-identifiers \ |
| 43 | + --title "fix(audit): ignore code blocks; tighten pronoun detection" \ |
| 44 | + --body "Refines simulation detection to skip fenced/inline code and avoid hyphen/underscore-bound identifiers. Adds unit tests." \ |
| 45 | + --labels "truth-kernel,audit" |
| 46 | +``` |
| 47 | +### 2) PR 2 — node test runner |
| 48 | +```bash |
| 49 | +node tools/gh-pr-open-and-merge.cjs \ |
| 50 | + --repo mrhpython/Soulfield \ |
| 51 | + --base main \ |
| 52 | + --head test/node-runner \ |
| 53 | + --title "test: switch to Node built-in runner; convert audit tests" \ |
| 54 | + --body "Replaces Mocha semantics with node:test. Updates package.json test script. Ensures zero-deps test execution in CI." \ |
| 55 | + --labels "tests,truth-kernel" |
| 56 | +``` |
| 57 | +### 3) Rebase docs branch after PR 1 & 2 merge |
| 58 | +```bash |
| 59 | +git switch docs/truthlens-readme-status |
| 60 | +git fetch origin |
| 61 | +git rebase origin/main |
| 62 | +npm ci && npm test && node backend/scripts/audit-truth.cjs |
| 63 | +``` |
| 64 | +### 4) PR 3 — docs |
| 65 | +```bash |
| 66 | +node tools/gh-pr-open-and-merge.cjs \ |
| 67 | + --repo mrhpython/Soulfield \ |
| 68 | + --base main \ |
| 69 | + --head docs/truthlens-readme-status \ |
| 70 | + --title "docs: TruthLens runtime + audit; compliance quick checks; Codex workflow" \ |
| 71 | + --body "README adds TruthLens + CI gate overview; STATUS adds compliance quick checks; TruthLens policy page gains canonical pointers." \ |
| 72 | + --labels "docs,truth-kernel" |
| 73 | +``` |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +## Notes |
| 78 | +- TruthLens is the governing policy; all outputs are wrapped at runtime:contentReference[oaicite:5]{index=5} and documented as OS intent:contentReference[oaicite:6]{index=6}. |
| 79 | +- Non-simulation contract applies to all agent outputs:contentReference[oaicite:7]{index=7}. |
| 80 | +- CI gate runs the Truth audit + tests on every push/PR. |
| 81 | + |
| 82 | +## Troubleshooting |
| 83 | +- If the helper reports “CI failed”, click into the PR checks to view logs. Fix locally, push to the branch, rerun the helper. |
| 84 | +- If `git rebase` reports conflicts, resolve locally, `git add <files> && git rebase --continue`, then rerun the PR 3 helper command. |
0 commit comments