fix: issues 1-8 from claude-sync pipeline build#74
Conversation
|
Note Red Team Review — OpenAI GPT-5.2 | Adversarial review (docs + diff only) Threat assessment — Medium risk: good intent and decent tests, but a couple of cache/projection changes are format one-way doors and there are some correctness + scale traps. One-way doors
Findings
Missing
VerdictShip with fixes — block until you fix the per-unit cache key correctness (config_extras + input_ids robustness) and address Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary A multi-issue fix PR (issues #1–#8) adding: per-unit cache checks in the build runner so only uncached units execute, a Claude Code Alignment Strong fit. Per-unit caching directly advances the "only rebuild what changed" principle from DESIGN.md §3.3 — materialization keys now work at unit granularity, not just layer granularity. Split projection hashing respects the cache-key-captures-all-inputs rule while avoiding unnecessary FTS5 rebuilds. The Claude Code adapter extends the "conversations are sources" model. Observations
Verdict This is a solid incremental step — the per-unit caching and split projection hashing are meaningful architectural improvements that directly serve the build-system-for-memory model, the new extension points are clean, and the test coverage is thorough. Review parameters
|
2105833 to
7e59de5
Compare
|
Note Red Team Review — OpenAI GPT-5.2 | Adversarial review (docs + diff only) Threat assessment — Medium risk: several behavior changes in caching and projection materialization that can silently invalidate (or worse, incorrectly reuse) outputs, plus a new adapter with overly-broad One-way doors
Findings
Missing
VerdictBlock — the per-unit cache keying (sorted input_ids) and projection content hashing (artifact IDs only) can produce incorrect cache hits and silently wrong outputs. Fix those contracts first, then re-review. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This is an omnibus PR addressing issues #1–#8: per-unit caching in the build runner, split projection hashing (content vs. embedding config), a Alignment Strong alignment. Per-unit caching (Issue 1) directly advances DESIGN.md's incremental rebuild semantics — materialization keys should mean "if it exists, skip." The split projection hash respects the principle that cache keys capture all inputs: content changes and embedding config changes are now independent invalidation axes, which is correct (changing your embedding model shouldn't re-index FTS5). The Observations
Verdict This is a solid incremental step — it closes real usability gaps (API key collisions, missing adapter, wasted LLM calls on cached units) while respecting the build system's core invariants around caching and provenance. The 413 recursion depth and the private method coupling warrant fixes before merge. Review parameters
|
Issues 1-5 (build system fixes): - Per-unit cache check in runner — skip cached units, only execute uncached - EmbeddingConfig.dimensions defaults to None (not passed to API when unset) - EmbeddingConfig.resolve_base_url() for env var fallback; manifest stores identity fields only - Batch size default 16 + 413 retry with halved batch - Plan estimation uses estimate_output_count when upstream is dirty Issues 6-8 (new features): - Ext transforms propagate input metadata: MapSynthesis auto-propagates (1:1), Group/Reduce/Fold accept metadata_fn for custom fields. All fingerprinted. - API key env var collision: api_key_env field + SYNIX_API_KEY/SYNIX_EMBEDDING_API_KEY precedence layers in LLMConfig and EmbeddingConfig - Claude Code JSONL adapter: parse .jsonl session files into transcript artifacts with metadata extraction (session_id, date, slug, cwd, git_branch)
7e59de5 to
7444bb9
Compare
|
Note Red Team Review — OpenAI GPT-5.2 | Adversarial review (docs + diff only) Threat assessment — Medium risk: lots of surface area touched (caching, projection cache format, adapter registry, ext transform fingerprinting/metadata), with a couple of subtle correctness traps. One-way doors
Findings
Missing
VerdictShip with fixes. The direction is fine, but per-unit cache identity is currently too hand-wavy and can skip work incorrectly; Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary A multi-issue PR (issues #1–#8) that adds per-unit caching within partially-dirty layers, a Claude Code JSONL adapter, Alignment Strong alignment with the build-system model. Per-unit caching (issue #1) directly advances the "skip-if-unchanged" incremental rebuild principle from DESIGN.md §3.3 — previously a single new source would re-execute the entire layer. Split projection hashing correctly separates content identity from embedding config, matching the design's emphasis on cache keys capturing all inputs (§3.3). The Observations
Verdict This is a solid incremental step — the per-unit caching and split projection hashing are meaningful architectural improvements to the cache system, the metadata propagation unlocks real pipeline-authoring needs, and the test coverage is thorough. The main risk is the private-API coupling in Review parameters
|
Add metadata_fn parameter to all 4 ext transform tables in pipeline-api.md, add Claude Code .jsonl to sources table, and update LLMConfig/EmbeddingConfig docstrings with the new api_key_env and SYNIX_API_KEY resolution chain.
|
Note Red Team Review — OpenAI GPT-5.2 | Adversarial review (docs + diff only) Threat assessment — Medium risk: mostly incremental improvements, but it introduces subtle cache/projection semantics and a new adapter that can silently drop data. One-way doors
Findings
Missing
VerdictBlock. Per-unit caching as implemented can return wrong cached artifacts for multi-input/order-sensitive units and ignores per-unit config, which is correctness-breaking and will be very hard to debug once shipped. Fix the cache keying (include ordered input IDs + unit-specific extras) and add targeted tests, then reassess. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary Multi-issue PR (issues #1–#8) addressing: per-unit cache checks during incremental builds, embedding config fixes (dimensions default, batch size, 413 retry), API key resolution chain with Alignment Strong alignment. Per-unit caching (#1) directly advances the "incremental rebuild" core promise — DESIGN.md §3.3 states "if the materialization key exists, skip." Previously, a single new source invalidated all units in a layer; now only uncached units execute. The Observations
Verdict This is a solid incremental step — it fixes real usability gaps (per-unit caching, API key collisions, Claude Code import) while maintaining alignment with the build-system-for-memory model, though the Review parameters
|
Summary
Batch fix for 8 issues discovered during claude-sync pipeline build:
Issues 1-5 (build system fixes):
execute()EmbeddingConfig.dimensionsdefaults toNone— not passed to API when unsetEmbeddingConfig.resolve_base_url()env var fallback; manifest stores identity fields only (no base_url/api_key)estimate_output_count()when upstream is dirtyIssues 6-8 (new features):
MapSynthesisauto-propagates (1:1),GroupSynthesis/ReduceSynthesis/FoldSynthesisacceptmetadata_fnfor custom fields. Allmetadata_fncallables included in fingerprint + cache key.api_key_envfield +SYNIX_API_KEY/SYNIX_EMBEDDING_API_KEYprecedence layers inLLMConfigandEmbeddingConfig.jsonladapter: parse session files into transcript artifacts with metadata (session_id, date, slug, cwd, git_branch)Test plan
uv run releasepasses (sync, lint, test, demos)test_issues_6_7_8.py(metadata propagation, API key resolution, JSONL parsing)test_issue_fixes.py(per-unit caching, dimensions, base_url, batch size, plan estimation)