feat: v3 architecture + cross-platform hardening#29
Conversation
alivecontext/alive — Open PR Merge Safety ReviewReviewer: Patrick Brosnan ( TL;DR — Recommended Merge Order
Independent-from-#29 bucket (can merge any order, any time after their own fixes): #33, #35. The Big Picture
Conflict MatrixPer-PR file count
Total unique files across all 7 PRs: 84 Pairwise overlapSorted by overlap count descending. Pairs with zero overlap are omitted (18 of 21 pairs have no overlap).
Total overlapping pairs: 3 out of 21 possible pairs. Key observations:
File matrix (compact — only rows with 2+ touches shown)
The remaining 76 files are each touched by exactly one PR and pose no conflict risk. PR #29 divergence detailsBranch state against main: 10 files require merge conflict resolution during rebase: Per-PR VerdictsPR #35 — post-write hook debounce breakURL: #35 Standalone safety: GREEN The bug on main is real and user-visible. That means the debounce on main is doubly broken: (1) the hook emits stderr on every repeated save, which Claude Code can surface as a hook failure; (2) execution falls through to The fix replaces The activity counter for statusline (lines 14-22) runs BEFORE the first Inter-PR compatibility: None. Zero file overlap with any other open PR. No semantic or behavioural interactions with #29's refactor or #33's Hermes subsystem — this hook's debounce logic is local. Merge order role: FIRST / EARLY. Merge immediately, ahead of everything else in the batch. 1-line fix, CI green, CLEAN merge state, fixes stderr noise on every repeated save. Merging first also removes any chance that Ben's rebase of #29 accidentally reintroduces the broken Recommendation: Merge as-is. Merge this first of the batch. No rebase needed. No author response needed. No dependencies. PR #28 — tasks.py archive crash fixURL: #28 Standalone safety: YELLOW The two fixes advertised in the PR body are both correct in isolation:
These two changes alone would be a ~40-line GREEN PR. But the body undersells the diff. Actual change is +304/-21, not ~40 lines. The undisclosed ~260 lines add a full v2→v3 auto-migration subsystem ( 4 concrete bugs in the hidden subsystem:
Plus: renumbering breaks external references (migrated tasks get fresh IDs starting from counter=1 — any log.md/bundle/doc reference to a v2 task by id now points somewhere else or nowhere); priority flattening for completed tasks (line 113 returns Inter-PR compatibility: Conflicts with #29 (textual only, not semantic). Both touch
Neither PR touches the lines the other modifies. git may report a conflict purely because #28's large insertion shifts #29's target line numbers, but 3-way merge resolves mechanically. Whichever lands first, the other rebases in under a minute. Compatible with: #31, #32, #33, #34, #35. Merge order role: Middle (after #35, before #29/#31/#33), and gated on author response about the migration subsystem. Recommendation: Author response needed before merge — DO NOT merge as-is. Ask Ben to choose:
PR #33 — Hermes Agent integrationURL: #33 Standalone safety: YELLOW Architecturally clean isolation. Everything lives under Stdlib-only Python. Memory provider imports only No security surface: no external API keys, no network calls, no subprocess execution, no file I/O outside But 6 real bugs need a follow-up commit:
Plus minor issues (not blockers): walnut-name match uses substring instead of word boundary ( Inter-PR compatibility: None. Every file lives under Merge order role: Middle (position 3-4). Fully isolated, can technically merge at any position, but size (27 files, +2961 LOC) means it deserves fresh reviewer attention — not late when fatigued by conflict resolution. Recommendation: Author response needed before merge — but a lightweight one. Ask Ben to land a follow-up commit fixing the 6 bugs above. Tests are absent but I would NOT block merge on adding them, given the isolation — Ben can ship the provider, get real Hermes users on it, and add tests once the API stabilises. The architectural direction is correct; the follow-up is mechanical. PR #29 — v3 architecture + cross-platform hardeningURL: #29 Standalone safety: GREEN (but the PR cannot merge as-is because of the textual conflict against main — the code itself is correct, the merge state is dirty). Is this PR still relevant? Yes. Verified every file on current main HEAD ( Subsystem overview: 15-file cleanup PR touching six concerns:
No bugs found. Every individual change is correct on a close read. No TODO/FIXME/debug. No security surface. No regression surface. The Windows python3 fallback is the right pattern (validate execution with Inter-PR compatibility: Conflicts with #32 (Patrick's — textual, 5 files, low friction). All 5 conflicts are same-intent-different-wording. Resolution ~5 minutes per file, ~15 minutes total:
Conflicts with #31 (dependency, not textual). #31 is stacked on #29's HEAD ( Conflicts with #28 (textual, 1 file, low friction). Both touch Compatible with #33 (Hermes) and #35 (post-write debounce) and #34 (landing page draft). Zero file overlap. The Hermes memory provider reads Merge order role: Late, but BEFORE #31. Specifically: slot 4 of 5 (after #35 GREEN, after #28 once author response resolves its issues, after #33 once follow-up fixes land). #31 must come immediately after #29 in slot 5. Rebase guidance for Ben (for resolving the 26-commit divergence):
Gap in PR body: The body claims "22 commits" but the actual branch has 8 ( Recommendation: Merge after rebase — no code changes required. Expected effort: 15-30 minutes of mechanical conflict resolution + 1 Windows smoke test. Do NOT close this PR as obsolete — 14 of 15 hunks still bring real value, and PR #31 — context graph rebuild for v3URL: #31 Standalone safety: YELLOW Base SHA What the PR actually does:
R-1. CRITICAL: top-level The OLD code computed a world-level Downstream breakage verified via GitHub code search on After #31 merges, those two fields will be absent. The world dashboard skill will either silently render without the session pulse / attention section, or crash trying to read a missing field, depending on how defensive its Bash/jq queries are. Fix path: Re-add both computations to R-2. MAJOR: graph loses the "world root" centrepiece node and the "inputs" buffer node. The OLD graph read Fix: restore both as pinned-centre "special: true" nodes, OR update user-facing docs + R-3 to R-7 (yellow / minor):
R-8 through R-15 (all OK or notes, not bugs): The JSON clean function is intentionally lossier (handled defensively downstream). No TODO/FIXME. No security surface. Force-directed layout is mathematically sound. Health-ring computation matches Inter-PR compatibility: Conflicts with #29 (DEPENDENCY, not textual). Stacked on #29's HEAD. Zero textual conflict — #31 has already eaten #29's tip. Cannot merge before #29 because its Interaction with #29's rebase: Ben's rebase of #29 touches Compatible with #28, #32, #33, #34, #35. Zero file overlap ( Merge order role: Position 5 of 5 (last), immediately after #29. Stacked dependency is absolute. Once #29 lands, GitHub auto-retargets #31 to main and it flips mergeable. Because #31's two files are disjoint from every other PR, its merge order relative to #28/#33/#35 is flexible — only the "after #29" constraint is hard. Recommendation: Merge after #29 — BUT fix R-1 first. Priority order:
Before merging, run PR #32 — P2P v3 (Patrick's, matrix-only)URL: #32 Self-review conflict of interest — no substantive verdict. This PR is Patrick's own work (superseding #27), so any merge-safety verdict from Patrick would be self-serving. No verdict rendered. Inter-PR impact: 5-file overlap with #29 on CI status: UNSTABLE is a first-time-contributor gate, NOT a test failure.
Diagnosis: Patrick is a first-time contributor to Action for Ben: Go to PR #32's Checks tab and click "Approve and run workflows". This dispatches the check runs. Results then become a real signal. Until approval, UNSTABLE should be treated as "unknown". Action for Patrick: Cannot fix this from the outside. Adding commits won't help — every new commit from a non-collaborator re-triggers the same gate. PR #34 — myalive.ai teaser landing (draft, matrix-only)URL: #34 Draft — out of scope for merge review. Not ready for merge. Inter-PR impact: Zero overlap with any other PR. Single file under its own subtree Blockers (must resolve before each PR can merge)None of the 5 deep-reviewed PRs are RED standalone (no PR has a blocking safety issue against current main). But several need pre-merge fixes:
PR #35 has no blockers. Merge it first. Notes for Ben
Where this report was postedPosting URLs appended here after the report landed on GitHub. See bottom of document. Generated via flow-next worker chain (Claude Code) as epic |
Prevents CRLF breakage on Windows for shell scripts, Python, Markdown, YAML, and JSON files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
/dev/stdin is not available on all platforms. Plain cat reads stdin by default and is more portable across Linux, macOS, and Windows (WSL). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove stale v2 references: _kernel/_generated/ subdirectory, bundles/ container directory, tasks.md. Update to v3 flat kernel (now.json at _kernel/ level), tasks.json + completed.json, and correct people walnut paths (02_Life/people/). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- generate-graph.py: add encoding='utf-8' to open() calls, narrow bare
except to (ValueError, TypeError, KeyError), add try/except around
json.load() for graceful error handling
- tasks.py: replace os.environ.get("USER") with getpass.getuser() for
Windows compatibility, remove unused pathlib import
- generate-index.py: remove unused pathlib import
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- load-context: bundles/{name}/ -> {name}/ (v3 flat bundles)
- save: remove bundles/*/tasks.md reference, use tasks.py
- search-world: bundles/research/ -> research/ in example
- walnut key.md template: now.md -> now.json
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- hooks.json: v2 -> v3 in description, 14 -> 13 hooks (archive enforcer was removed in v3) - README.md: 14 -> 13 hooks in install line and runtime diagram - CHANGELOG.md: 5 -> 6 rules rewritten (matches actual count) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Stash Checkpoint section correctly states save IS the checkpoint with no automatic mid-session writes. The Stash Discipline section and instinct 11 contradicted this with shadow-write timers. Reconciled both to match: save is the checkpoint, transcript JSONL is crash recovery. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Windows ships a python3 stub (AppInstallerPythonRedirector.exe) that passes `command -v` but fails to execute (exit code 49). This caused all Python- dependent hooks to silently fail: no now.json generation, no index updates, empty squirrel entries. Fix: validate python3 actually runs (`python3 -c ""`), then try the Windows py launcher (`py -3`), shimming it as a python3 function so all existing callsites work without changes. Falls through to node if neither works. Fixes: Windows hooks silently broken due to python3 Store stub Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
de8d602 to
a76b6d5
Compare
Summary
_kernel/, nobundles/container, JSON tasks viatasks.py,now.jsoncomputed byproject.py).gitattributesfor LF line endings (fixes Windows), portable stdin handling, UTF-8 encoding safety,getpass.getuser()for WindowsUSERenv var,os.replace()overos.rename()stackwalnuts→alivecontextacross install commands, README, CHANGELOG_kernel/_generated/,bundles/prefix,tasks.md,now.mdall updated to v3 equivalentsWhat changed (22 commits)
v3 architecture (15 commits)
Cross-platform fixes (7 commits)
.gitattributes— forces LF for .sh/.py/.md/.yaml/.json (CRITICAL for Windows)cat /dev/stdin→cat(Git Bash portability)generate-graph.py—encoding='utf-8'on allopen(), narrowed bareexcept:, guardedjson.load()tasks.py—os.replace()overos.rename(),getpass.getuser()for Windows, removed unused importsgenerate-index.py— removed unused importTest plan
claude plugin install alive@alivecontext.gitattributesprevents CRLF/alive:system-upgrade, verify migration_kernel/is flat (no_generated/, nobundles/)tasks.pyon Windows: verifygetpass.getuser()worksgenerate-graph.pywith malformed_index.json: verify graceful errorgenerate-index.pyreads v3now.jsoncorrectly🤖 Generated with Claude Code