Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
pr_number: 3107
title: "docs(lior): antigravity check and shadow log update"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-14T06:42:55Z"
merged_at: "2026-05-14T06:53:45Z"
closed_at: "2026-05-14T06:53:45Z"
head_ref: "lior/antigravity-check-2026-05-14-new"
base_ref: "main"
archived_at: "2026-05-14T08:01:31Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3107: docs(lior): antigravity check and shadow log update

## PR description

Lior antigravity check. Found Riven drift (dirty tree). Ran PR preservation for PRs 3095, 3096, 3097, 3098, 3104.

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-14T06:44:00Z)

## Pull request overview

This PR adds historical/archive documentation: a shadow-lesson research note about a Riven dirty-tree drift incident, plus five PR preservation archives (PRs #3095, #3096, #3097, #3098, #3104) generated by `tools/pr-preservation/archive-pr.ts`. All files are history-surface documentation under `docs/research/` and `docs/pr-discussions/`.

**Changes:**
- Add shadow-lesson research note documenting Riven's `git worktree` isolation drift.
- Add five PR preservation archives capturing review threads and resolutions for recently merged PRs.

### Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

<details>
<summary>Show a summary per file</summary>

| File | Description |
| ---- | ----------- |
| docs/research/2026-05-14-shadow-lesson-log-riven-dirty-tree-drift.md | New shadow-lesson log on dirty-tree contamination drift. |
| docs/pr-discussions/PR-3104-*.md | Archive of PR #3104 (MEMORY.md cutover parity validation). |
| docs/pr-discussions/PR-3098-*.md | Archive of PR #3098 (ordering/formatting contract docs). |
| docs/pr-discussions/PR-3097-*.md | Archive of PR #3097 (MEMORY.md harness contract verification). |
| docs/pr-discussions/PR-3096-*.md | Archive of PR #3096 (close B-0145 PM-2 role). |
| docs/pr-discussions/PR-3095-*.md | Archive of PR #3095 (bg-services launchd wiring status). |
</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
pr_number: 3108
title: "fix(tsc): guard undefined capture group in validate-memory-parity"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-14T06:55:18Z"
merged_at: "2026-05-14T06:58:55Z"
closed_at: "2026-05-14T06:58:55Z"
head_ref: "fix/tsc-validate-memory-parity-undefined-group-2026-05-14"
base_ref: "main"
archived_at: "2026-05-14T08:01:31Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3108: fix(tsc): guard undefined capture group in validate-memory-parity

## PR description

## Summary

- TypeScript 6.0 types `RegExpMatchArray` capture groups as `string | undefined` — even non-optional groups like ours — causing five `TS18048`/`TS2345` errors in `tools/memory/validate-memory-parity.ts`
- Adds a two-line guard (`const captured = m[1]; if (captured === undefined) continue;`) that narrows the type to `string`, fixes all five errors, and eliminates the `lint (tsc tools)` failure on every future CI run
- No functional change: the regex's single capture group will never actually be `undefined`, so the guard is only type-level

## Test plan

- [x] `bun --bun tsc --noEmit -p tsconfig.json` exits 0 locally
- [ ] `lint (tsc tools)` CI check passes green

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-14T06:57:04Z)

## Pull request overview

This PR fixes TypeScript 6.0 strict typing in `validate-memory-parity` by narrowing a regex capture group before using it as a string.

**Changes:**
- Adds an explicit `undefined` guard for `m[1]`.
- Preserves existing runtime behavior while satisfying stricter `RegExpMatchArray` typing.
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
pr_number: 3109
title: "fix(b-0260): make reindexer recursive \u2014 scan memory/ subdirectories"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-14T07:08:28Z"
merged_at: "2026-05-14T07:16:22Z"
closed_at: "2026-05-14T07:16:22Z"
head_ref: "feat/b-0260-reindexer-recursive-subdir-2026-05-14"
base_ref: "main"
archived_at: "2026-05-14T08:01:22Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3109: fix(b-0260): make reindexer recursive — scan memory/ subdirectories

## PR description

## Summary

- **Root cause diagnosed**: `collectEntries` in `reindex-memory-md.ts` used non-recursive `readdir`, silently excluding files in `memory/` subdirectories (e.g. `memory/observed-phenomena/`). Both affected files had valid YAML frontmatter — the parity validator's `gap-no-frontmatter` label was a misleading diagnosis; the true cause was `gap-subdirectory-not-scanned`.
- **Fix**: extracted `collectEntriesRecursive` helper using `readdir({ withFileTypes: true })`, recursing into subdirs and storing paths relative to `baseDir` (e.g. `observed-phenomena/file.md`) — correct for both MEMORY.md markdown links and the parity-validator lookup set.
- **Tests**: 2 new tests added (`scans subdirectories recursively`, `uses subdir-relative path for subdirectory entries`). All **20/20 tests pass**.
- **Closes B-0260**: all acceptance criteria met.

## Parity result

```
Old-index entries: 672
Unique files: 672
Covered (ok): 672 ← was 670 (2 gaps before this fix)
No-frontmatter gap: 0 ← was 2
Missing (loss): 0

Full parity: all old-index files are covered by the generated index.
```

## B-0260 acceptance criteria

- ✅ `memory/MEMORY.md` generated by tooling, not hand-edited
- ✅ Entry coverage parity verified: 672/672 covered
- ✅ Zero missing entries (no coverage loss)
- ✅ No intentional behavior changes requiring follow-up issues

## Build gate

```
dotnet build -c Release → 0 warnings, 0 errors
bun test tools/memory/ → 20 pass, 0 fail
bun tools/memory/validate-memory-parity.ts → 672/672 covered, 0 gaps, 0 missing
```

## Test plan

- [x] `bun test tools/memory/reindex-memory-md.test.ts` — all 20 pass
- [x] `bun tools/memory/validate-memory-parity.ts` — full parity confirmed
- [x] `dotnet build -c Release` — 0 warnings, 0 errors
- [x] B-0260 backlog item marked `closed` with closure notes
- [x] BACKLOG.md regenerated (B-0260 shows `[x]`)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-14T07:09:46Z)

## Pull request overview

Fixes B-0260 by making the memory reindexer recursive so files in `memory/` subdirectories (e.g., `memory/observed-phenomena/`) are included in `MEMORY.md`. Resolves the final 2 parity gaps (672/672 covered).

**Changes:**
- Replaces non-recursive `collectEntries` with a `collectEntriesRecursive` helper using `readdir({ withFileTypes: true })`, storing `filename` as a path relative to `baseDir`.
- Adds 2 tests covering recursive discovery and subdir-relative filename.
- Marks B-0260 closed (backlog row + regenerated `docs/BACKLOG.md`) and updates `MEMORY.md` heap-count footer (1103 → 1130).

### Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

<details>
<summary>Show a summary per file</summary>

| File | Description |
| ---- | ----------- |
| tools/memory/reindex-memory-md.ts | Recursive scan + relative-path filename for entries. |
| tools/memory/reindex-memory-md.test.ts | Adds two tests for recursive subdir scanning. |
| tools/memory/testdata/subdir/gamma_2026_05_14.md | Test fixture under a subdir. |
| memory/MEMORY.md | Footer heap-count updated to reflect new total. |
| docs/backlog/P1/B-0260-...md | Status → closed with closure notes. |
| docs/BACKLOG.md | Regenerated index entry checkbox for B-0260. |
</details>

### COMMENTED — @chatgpt-codex-connector (2026-05-14T07:10:13Z)


### 💡 Codex Review

Here are some automated review suggestions for this pull request.

**Reviewed commit:** `895b51c111`


<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>

[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.


Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

</details>

### COMMENTED — @AceHack (2026-05-14T07:13:30Z)

_(no body)_

## Review threads

### Thread 1: tools/memory/reindex-memory-md.ts:145 (resolved)

**@chatgpt-codex-connector** (2026-05-14T07:10:14Z):

**<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Normalize subdirectory paths to POSIX separators**

Using `relative(baseDir, itemPath)` stores OS-native separators, so on Windows subdirectory entries become `subdir\file.md`. That breaks the intended parity fix in this commit because `validate-memory-parity.ts` and old index links are slash-based (`/`), so `reindexedSet.has(filename)` will miss these files and report false `gap-no-frontmatter` results; the generated `MEMORY.md` links are also non-portable. Normalize `filename` to POSIX form before storing/rendering to keep behavior consistent across platforms.

Useful? React with 👍 / 👎.

**@AceHack** (2026-05-14T07:13:30Z):

Fixed in 434748e6: normalized via `.replace(/\\/g, "/")` immediately after `relative()`. Subdirectory entries now always use POSIX separators regardless of host OS, matching the parity validator and MEMORY.md link conventions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
pr_number: 3110
title: "feat(b-0261): AutoDream/AutoMemory compat validation \u2014 PASS; B-0066 close-recommended"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-14T07:33:57Z"
merged_at: "2026-05-14T07:42:48Z"
closed_at: "2026-05-14T07:42:49Z"
head_ref: "feat/b-0261-autodream-compat-validation-2026-05-14"
base_ref: "main"
archived_at: "2026-05-14T08:01:22Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3110: feat(b-0261): AutoDream/AutoMemory compat validation — PASS; B-0066 close-recommended

## PR description

## Summary

- Runs the five-step harness contract verification procedure (from B-0257's research note) against the post-B-0260 cutover state of `memory/MEMORY.md`.
- All AutoDream/AutoMemory compatibility claims **PASS**.
- B-0261 closed; B-0066 marked `close-recommended`.

## Verification checks (run 2026-05-14)

| Check | Result |
|-------|--------|
| Line cap post-cutover (limit ~200) | ✅ PASS — **110 lines** (was 370 pre-cutover) |
| Byte cap post-cutover (limit ~25 KB) | ❌ PARTIAL — 62 KB (pre-existing gap, not a regression) |
| One-line-per-file pointer format | ✅ PASS — 100/100 entry lines correct |
| Reindexer `--check` | ✅ PASS — exit 0, "Entries: 1230. Index current." |
| AutoDream marker preserved at line 1 | ✅ PASS — `[AutoDream last run: 2026-04-23]` |
| AutoDream write-back compat | ✅ PASS — reindexer reads+preserves marker via regex |
| AutoMemory write-back scope | ✅ PASS — AutoMemory targets user-scope path, not repo-scope |

## Key architectural finding

**Two independent MEMORY.md surfaces exist:**

| Surface | Path | Writer |
|---------|------|--------|
| Repo-scope | `memory/MEMORY.md` (this repo) | `reindex-memory-md.ts` + AutoDream (flag-gated) |
| User-scope | `~/.claude/projects/<slug>/memory/MEMORY.md` | Anthropic's AutoMemory harness |

AutoMemory writes to the user-scope path. It does **not** interact with the repo-scope `memory/MEMORY.md`. No write-back conflict is possible.

## Known gap — byte-cap overage (pre-existing)

The repo-scope MEMORY.md is 62 KB vs the ~25 KB harness byte cap. This predates B-0260 (was 108 KB before cutover). Mitigation: the reindexer's 100-entry stack cap. Three rollback options documented in the research note (trim descriptions / reduce stack cap / wait for feature-flag graduation).

## Files changed

- `docs/research/b-0261-autodream-automemory-compatibility-validation-2026-05-14.md` ← new; full pass/fail evidence
- `docs/backlog/P1/B-0261-…md` ← status: open → closed; closure notes added
- `docs/backlog/P1/B-0066-…md` ← status: open → close-recommended; done-criteria ticked
- `docs/hygiene-history/ticks/2026/05/14/0730Z.md` ← tick shard

## Build gate

```
dotnet build -c Release → 0 warnings, 0 errors
```

## Test plan

- [x] `bun tools/memory/reindex-memory-md.ts --check` exits 0 post-cutover
- [x] `wc -l < memory/MEMORY.md` = 110 (under 200-line cap)
- [x] `head -1 memory/MEMORY.md` shows AutoDream marker intact
- [x] All 100 entry lines follow `- [Title](file.md) — hook` format (grep check passes)
- [x] `dotnet build -c Release` = 0 warnings, 0 errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Reviews

### COMMENTED — @chatgpt-codex-connector (2026-05-14T07:36:01Z)


### 💡 Codex Review

Here are some automated review suggestions for this pull request.

**Reviewed commit:** `91db7aa8d0`


<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>

[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.


Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

</details>

### COMMENTED — @copilot-pull-request-reviewer (2026-05-14T07:36:02Z)

## Pull request overview

Documentation-only PR validating that the post-B-0260 auto-generated `memory/MEMORY.md` is compatible with AutoDream and AutoMemory write-backs, closing B-0261 and recommending B-0066 for closure. Adds a research report with five-step evidence, updates two backlog rows, and lands the corresponding tick shard.

**Changes:**
- New research note documenting line-cap / byte-cap / format / reindexer / AutoDream-marker / AutoMemory-scope evidence, plus a known pre-existing 62 KB byte-cap gap and rollback options.
- B-0261 transitioned `open → closed` with closure notes; B-0066 transitioned `open → close-recommended` with done-criteria checkboxes ticked.
- New hygiene tick shard at `0730Z.md` summarising the verify trace.

### Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

| File | Description |
| ---- | ----------- |
| docs/research/b-0261-autodream-automemory-compatibility-validation-2026-05-14.md | New 214-line research report with five-step verification evidence and rollback options. |
| docs/hygiene-history/ticks/2026/05/14/0730Z.md | Tick shard recording the verify trace and key finding. |
| docs/backlog/P1/B-0261-…2026-05-08.md | Status flip to `closed` with closure notes summarising PASS/PARTIAL results. |
| docs/backlog/P1/B-0066-…2026-04-28.md | Status flip to `close-recommended`, done-criteria checkboxes ticked, close-recommendation block appended. |

### COMMENTED — @AceHack (2026-05-14T07:41:27Z)

**Thread responses:**

**Codex P2 (done-criteria inconsistency):** Fixed in fb81aba4. Changed "All done-criteria from B-0066 are satisfied" to "All blocking done-criteria from B-0066 are satisfied; the remaining criterion (hotspot monitoring) is explicitly non-blocking per the B-0066 row." This correctly conveys that the open item is ongoing monitoring, not a blocking condition.

**Copilot (invalid status enum / generate-index drift):** Fixed in fb81aba4.
- `status: close-recommended` → `status: closed` in B-0066 frontmatter (valid enum per tools/backlog/README.md)
- Added `closed: 2026-05-14` frontmatter field
- Regenerated `docs/BACKLOG.md` — both B-0066 and B-0261 now render as `[x]` (closed)
- Also updated B-0261 to fill PR #NNNN placeholder with #3110 and fix MD032 blank-line spacing

Both markdownlint and generate-index --check pass locally.

## Review threads

### Thread 1: docs/research/b-0261-autodream-automemory-compatibility-validation-2026-05-14.md:201 (resolved)

**@chatgpt-codex-connector** (2026-05-14T07:36:02Z):

**<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Avoid declaring all done-criteria satisfied**

This section says "All done-criteria from B-0066 are satisfied" even though the very next table marks the hotspot-threshold criterion as "To be verified by B-0067 detector." That inconsistency can lead to premature backlog closure decisions or incorrect status rollups when reviewers rely on this document as evidence. Please qualify the claim (for example, "all blocking criteria") or mark the remaining criterion explicitly out-of-scope for closure.

Useful? React with 👍 / 👎.

### Thread 2: docs/backlog/P1/B-0066-memory-md-marker-vs-index-harness-verify-q1-automemory-aaron-2026-04-28.md:4 (resolved)

**@copilot-pull-request-reviewer** (2026-05-14T07:36:02Z):

The `status: close-recommended` value is not part of the allowed enum for backlog row frontmatter. Per `tools/backlog/README.md` lines 59-70, the only valid `status` values are `open`, `closed`, `superseded-by-B-NNNN`, and `deferred`. Additionally, `tools/backlog/generate-index.ts::checkboxFor` (lines 129-133) only recognises `closed` and `superseded-by-*` as ticked — any other value (including `close-recommended`) silently renders as an open `[ ]` row in `docs/BACKLOG.md`, which contradicts the "close recommendation produced" intent. Either keep B-0066 as `open` and rely on the in-body "Close recommendation" section to signal readiness, or close it outright. If a new status is genuinely needed, update the schema in `tools/backlog/README.md` and the enum logic in `tools/backlog/generate-index.ts` in the same PR.
Loading
Loading