feat: synix.ext configurable transform library#72
Conversation
Add four configurable transforms that eliminate boilerplate for common LLM pipeline patterns: - MapSynthesis (1:1): apply a prompt to each input independently - GroupSynthesis (N:M): group by metadata key, one output per group - ReduceSynthesis (N:1): combine all inputs into a single output - FoldSynthesis (N:1 sequential): accumulate through inputs one at a time Rewrite the 03-team-report demo to use ext transforms instead of custom Transform subclasses, reducing pipeline.py from ~140 lines to ~65. Simplify README.md to follow a simple-to-complex trajectory, moving detailed reference material to docs/pipeline-api.md. Add full ext transforms documentation with parameter tables and examples.
|
Note Red Team Review — OpenAI GPT-5.2 | Adversarial review (docs + diff only) Threat assessment — Medium risk: you’re adding a new public module ( One-way doors
Findings
Missing
VerdictBlock. The ext transforms are a reasonable direction, but cache keys are currently wrong for several parameters and Reduce/Group are unbounded and will fail badly at scale; both are core-build-system correctness issues, not polish. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR introduces Alignment Strong fit. DESIGN.md's four build rule types (transform, aggregate, fold, merge) map cleanly to Map/Group/Fold/Reduce. The ext transforms maintain content-addressed artifacts, include prompt text in cache keys, fingerprint callables for cache invalidation, and sort inputs deterministically — all consistent with the materialization key and audit determinism principles. The Python-first bet (§4.1: "code > config") is advanced while lowering the barrier: users who don't need custom logic avoid subclassing entirely. The README refactor correctly pushes detail into dedicated docs without losing the "build system for memory" framing. Observations
Verdict This is a well-executed PR that lowers the barrier to pipeline authoring while preserving architectural integrity — a clear good step for the project, with minor concerns around private API exposure in the extension surface and a couple of defensive coding gaps. Review parameters
|
- Cache keys now include all config parameters (artifact_type, group_by,
on_missing, missing_key, sort_by) — changing any parameter invalidates
cache even if prompt stays the same
- Safe template rendering via _render.py — escapes placeholder tokens in
user content so {artifact} in artifact text won't cause double-substitution
- Replace print(stderr) with proper logging via logger.warning() in
GroupSynthesis
- Add 16 new tests: cache key invalidation for all parameters, template
injection safety, render_template unit tests
|
Note Red Team Review — OpenAI GPT-5.2 | Adversarial review (docs + diff only) Threat assessment — Medium risk: you’re introducing a new public “configurable transforms” API ( One-way doors
Findings
Missing
VerdictBlock — Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR introduces Alignment Strong fit. DESIGN.md's Python-first decision (§4.1) explicitly argues for code over config to enable experimentation. The ext module sits at the right level: it's still Python objects with Observations
Verdict This is a well-executed extension-model PR that makes the common case easy while keeping the custom-transform escape hatch — a good incremental step that directly serves the "iterate on architectures" thesis. Review parameters
|
Resolve conflicts from ext transforms merge (PR #72): - Keep v0.12.1 version from main - Keep HEAD's batch-build fixes (create_fresh, pipeline hash, N:1 gating, per-unit errors) - Merge CLI table styles from main with full batch-build commands
Summary
synix.extpackage with four configurable transforms:MapSynthesis(1:1),GroupSynthesis(N:M),ReduceSynthesis(N:1),FoldSynthesis(N:1 sequential)03-team-reportdemo to use ext transforms — pipeline.py drops from ~140 lines to ~65docs/pipeline-api.mdTest plan
uv run releasepasses (lint + 1051 tests + 5 demos)uvx synix initscaffold still works with ext transformsdocs/pipeline-api.mdanchor links work from README