|
| 1 | +# Cross-Language Sync Report — 2026-04-09 |
| 2 | + |
| 3 | +> Generated after cleanup-2026-04 cross-repo audit round. |
| 4 | +> Scope: apcore (spec) + apcore-python + apcore-typescript + apcore-rust |
| 5 | +> Method: Full public API extraction from all 3 SDKs via parallel sub-agents, |
| 6 | +> then cross-comparison against each other and spec. |
| 7 | +
|
| 8 | +## Result: No regressions from cleanup-2026-04 commits |
| 9 | + |
| 10 | +All 12 commits from the cleanup session (4 repos) were verified to introduce |
| 11 | +**zero new cross-language inconsistencies**. The 4 areas we changed are now |
| 12 | +**more consistent** than before: |
| 13 | + |
| 14 | +| Area | Before | After | |
| 15 | +|------|--------|-------| |
| 16 | +| ACL condition aliases | py: plural only, ts: singular+plural, rust: plural only | All 3: **plural only** | |
| 17 | +| ACL sync/async check | py: shared helpers, ts: N/A (Promise), rust: duplicated | All 3: **shared audit construction** | |
| 18 | +| `module()` factory auto-ID | py: auto, ts: silent 'anonymous' collision, rust: no factory | py: auto, ts: **throws on missing id**, rust: no factory — all spec-compliant | |
| 19 | +| Zombie error classes | py: 2 zero-raise classes, ts: same 2, rust: N/A (enum) | py: **deleted**, ts: **deleted**, rust: enum variants remain (correct) | |
| 20 | + |
| 21 | +## Pre-existing divergences (not caused by this session) |
| 22 | + |
| 23 | +These are intentional and documented. Listed here as baseline for future audits: |
| 24 | + |
| 25 | +1. **Python `APCore.module()` is a decorator** — TS `module()` is a factory, |
| 26 | + Rust has no equivalent. Spec §5.11.6 allows this because the decorator |
| 27 | + syntax is only available in Python. |
| 28 | + |
| 29 | +2. **Rust `Config` is typed** (`ExecutorConfig`, `ObservabilityConfig` structs) |
| 30 | + — Python/TS are dict-based. Spec §9 does not mandate either approach. |
| 31 | + |
| 32 | +3. **Rust `Registry.register()` requires a pre-built `ModuleDescriptor`** — |
| 33 | + Python/TS auto-construct it from the module object + metadata YAML. |
| 34 | + Related to the YAML annotation overlay difference (see Rust README). |
| 35 | + |
| 36 | +4. **TS exports `ToggleState` as a public class** — Python/Rust handle toggle |
| 37 | + state internally via sys-module. |
| 38 | + |
| 39 | +5. **Rust `stream()` returns `Vec<Value>`** (collected) — Python/TS return |
| 40 | + `AsyncGenerator`/`AsyncIterator` (lazy). Rust's tokio `Stream` trait is |
| 41 | + not stable enough for public API; collected vec is the interim choice. |
| 42 | + |
| 43 | +6. **Rust has no `_handle_file_change` / hot-reload path** — Python has it |
| 44 | + (refactored in this session to use `resolve_entry_point`), TS has `watch()`. |
| 45 | + |
| 46 | +7. **Error class count**: Python 40 classes, TS 40 classes, Rust 1 struct + |
| 47 | + 43 enum variants. Spec §8.1 does not mandate a class hierarchy. The |
| 48 | + Rust approach (single `ModuleError` + `ErrorCode` enum) is the target |
| 49 | + model for a future deprecation cycle (cleanup-2026-04 P0.2). |
| 50 | + |
| 51 | +## Export count baseline |
| 52 | + |
| 53 | +| SDK | Total exports | Error classes/variants | Other classes | Functions | Constants | |
| 54 | +|-----|--------------|----------------------|--------------|-----------|-----------| |
| 55 | +| Python | ~155 | 40 | ~50 | ~30 | ~15 | |
| 56 | +| TypeScript | ~188 | 40 | ~55 | ~40 | ~20 | |
| 57 | +| Rust | ~101 | 1 + 43 variants | ~55 | ~20 | ~10 | |
| 58 | + |
| 59 | +## Recommended next steps |
| 60 | + |
| 61 | +1. Finalize release-prep CHANGELOG.md edits in apcore-python and apcore-typescript |
| 62 | +2. Run `/apcore-skills:audit` in a fresh session on clean working trees |
| 63 | +3. The audit should specifically verify: |
| 64 | + - PROTOCOL_SPEC.md section references in all 3 SDKs' code comments |
| 65 | + - README examples match current API signatures (especially after module() change) |
| 66 | + - Test coverage for the new `module()` throw behavior in TS |
| 67 | + - Conformance test alignment across all 3 SDKs |
0 commit comments