Skip to content

Cross-language alignment decisions (D-01 – D-65)

Historical decision record

Current behaviour is defined by protocol-spec.md; decision status is tracked in decision-register.md.

This document records every cross-language inconsistency that the May 2026 sync run surfaced as spec ambiguity rather than implementation bug. Each item needed a maintainer decision before code could be aligned across the Python, TypeScript, and Rust SDKs. The status-quo paragraphs describe the SDKs as they were when the item was raised; Resolution status gives each item's outcome.

Items already fixed (28 commits across 3 SDKs) are not in this log — see CHANGELOG.md of each SDK and the sync report.

Decision template per item: - Status quo: what each SDK did at the time - Options: A / B (sometimes C) - Recommendation: maintainer's first-pass call (subject to review) - Owner: who needs to sign off - Action: concrete change once decided


Decision-ID renumber (2026-05-26)

Entries formerly numbered D-17–D-22 in this log were renumbered to D-58–D-63 to resolve a duplicate-assignment collision: the v0.22.0 executor/async hardening decisions independently took D-17–D-22 (recorded in CHANGELOG.md, docs/features/core-executor.md, docs/features/async-tasks.md, and the SDK repos), and those hardening decisions retain D-17–D-22. Mapping: D-17→D-59 (caller_id_for_unknown), D-18→D-60 (ACL priority field), D-19→D-58 (stream chunk shape), D-20→D-61 (compute_delay rounding), D-21→D-62 (ExtensionManager apply() idempotency), D-22→D-63 (ExtensionManager get/get_all/unregister API).

D-23 and D-24 were not renumbered and still share their numbers with two 0.22.0 decisions recorded only in CHANGELOG.md (get_status / list_tasks return copies; the six-parameter Context.create()). The decision register lists both meanings of every colliding ID.


D-01 — IdentityType: closed enum vs free-form

Status quo - protocol-spec.md §5.7 declares enum: [user, service, agent, api_key, system] - docs/features/identity-system.md:80 says "type field is free-form" - docs/features/identity-system.md:10 and core-executor.md / approval-system.md examples reference "ai" as a value - All 3 SDKs accept any string at construction (no validation)

Options - A Closed enum: pin §5.7 list, add ai to it explicitly, validate at Identity construction in all 3 SDKs (rejects unknown types with InvalidInputError) - B Free-form: drop §5.7 enum, document the 5–6 well-known values as a non-binding convention, no SDK validation

Recommendation: B. Identity type is observably free-form today; closing the enum is breaking for any consumer that uses non-standard values (custom service types, cluster role names). Document the 5–6 well-known values as examples rather than enum in the JSON schema.

Action: edit PROTOCOL_SPEC §5.7 to remove enum: and add examples: [user, service, agent, api_key, system, ai]. Update identity-system.md to remove the contradictory "free-form" sentence and reference the examples list.


D-02 — ApprovalStatus enum value: granted vs approved

Status quo - Every SDK uses "approved" literal (Python Literal['approved', ...], TS string union, Rust comment) - conformance/fixtures/approval_gate.json uses "approved" - docs/features/approval-system.md:90 uses "approved" - The agent-prompt-level spec text used "granted" — this was the wording mismatch flagged in AP-002

Options - A Keep "approved" (matches all implementations + fixtures + feature spec doc) - B Change to "granted" (matches the agent-prompt spec text)

Recommendation: A. Implementation, fixtures, and the canonical feature spec doc all agree on "approved". The "granted" variant only appeared in derivative prompt text. No code change needed; close the finding and update any derivative prompt/audit material that says granted.

Action: grep for granted across spec docs and replace with approved. No SDK change.


D-03 — ApprovalRequest fields: add caller_id and action?

Status quo - docs/features/approval-system.md Contract block: "request MUST contain module_id, caller_id, and action" - Every SDK only has module_id, arguments, context, annotations, description, tags — no caller_id, no action - Handlers can derive caller_id from context.identity and action from module_id today

Options - A Add both fields to ApprovalRequest in all 3 SDKs; populate from context+module_id in BuiltinApprovalGate - B Drop the requirement from the spec — document that handlers should derive these from context.identity and module_id themselves

Recommendation: A. The fields are cheap to add and they let handlers (Slack approver, audit log) inspect a single flat record without traversing context. Spec is authoritative; align implementations.

Action: - Add caller_id: Optional[str] and action: str to ApprovalRequest in all 3 SDKs - BuiltinApprovalGate populates: caller_id = context.caller_id, action = module_id - Add conformance fixture asserting both are present in the request payload - Bump SDK version to 0.21.0; CHANGELOG ### Added


D-04 — Audit-entry & error wire format: snake_case vs camelCase (TS outlier)

Outcome: resolved as Option A for everything that crosses a process boundary. apcore-typescript's ModuleError.toJSON() emits snake_case keys (trace_id, ai_guidance, user_fixable, and snake-cased details), matching Python and Rust (sync finding A-D-008), and ACL audit entries delivered on apcore.acl.audit use their snake_case wire names (D-66). In-process TypeScript properties keep camelCase names, as Option A allowed. The deferral notes below record the state on 2026-05-02.

Status quo - Python: to_dict() emits trace_id, ai_guidance, user_fixable; details keys are snake_case - TS: toJSON() emits traceId, aiGuidance, userFixable; details keys are camelCase; AuditEntry interface uses camelCase keys - Rust: serde defaults (snake_case) - CLAUDE.md writing-rules section states: "use caller_id / target_id / module_id (not caller / target alone)" - propagate_error in TS even produces duplicate keys (module_id + moduleId) on the same payload because the constructor wrote camelCase but the helper appends snake_case

Options - A Make snake_case the canonical wire form: fix TS to emit snake_case in toJSON, details, AuditEntry. Add deprecation aliases (camelCase getters that warn) for one minor version. Internal TS code can keep camelCase — only wire/serialization changes. - B Make camelCase the canonical wire form: change Python to_dict and Rust serde renames. Largest disruption (Python users + Rust JSON consumers both affected). - C Allow both forms simultaneously: emit canonical (snake) but accept both on parse. Reduces breakage but complicates consumers.

Recommendation: A. snake_case is already the protocol convention (per CLAUDE.md, PROTOCOL_SPEC, type-mapping). TS is the only outlier. Fixing TS aligns with 2 of 3 SDKs and the spec text. Add deprecation period: errorOnDeprecated: false mode logs warning when old key is used.

Action (deferred — needs dedicated PR): A first attempt was made on 2026-05-02 (Step C of this decision-log batch) but stalled mid-rename. The rename touches: - src/errors.ts — ~50 error subclass constructors writing detail keys (moduleId, callerId, targetId, modulePath, callableName, approvalId, errorCode, ...) - src/sys-modules/audit.ts — AuditEntry interface fields (targetModuleId, actorId, actorType, traceId) - src/utils/error-propagation.ts — duplicate-key writes - ~30 test files that reference the old field names directly (err.traceId, err.details.moduleId, entry.actorId)

Plus deprecation getters on ModuleError instances for traceId / aiGuidance / userFixable with one-shot deprecation warnings.

Why deferred: the mechanical scope is too brittle for an unattended sub-agent. Recommend a dedicated PR with a codemod (jscodeshift or simple sed/AST rename) that:

  1. Scans every test file for \.(traceId|aiGuidance|userFixable)\b and details\.(moduleId|callerId|...) — produces a rename plan
  2. Applies the source-side rename atomically (errors.ts + audit.ts + error-propagation.ts in one commit)
  3. Applies the test-side rename atomically (one commit per test directory)
  4. Adds the deprecated camelCase getters with one-shot console.warn (separate commit)
  5. Updates CHANGELOG.md ### Changed with a v0.21.0 deprecation notice + removal target v0.22.0

Expected commit count: 4–6. Expected duration: 1–2 hours of focused work.

Blocking factor: needs a dev session with full test-suite re-validation, not an unattended agent.


D-05 — Module.stream() fallback: implement everywhere?

Status quo - Spec MUST: Module.stream() defaults to execute() wrapped as a single chunk - Python+TS implement the fallback; Rust returns streaming_not_supported_error() (CRITICAL — fixed in round-3)

Status: resolved in round-3 commit b89b7a5. Mention here for completeness; no further action.


D-06 — multi_class_enabled config plumbing

Outcome: superseded by D-107 (spec v1.50.0), which re-affirmed per-class markers as the only multi-class opt-in and withdrew the file-level toggles that remained in apcore-typescript and apcore-rust.

Status quo - Spec: there's a global config key extensions.multi_class_discovery (boolean) - Python: no enabled flag at all; per-class @multi_class decorator opt-in - TS: function arg multiClassEnabled: boolean = false - Rust: struct field DiscoveryConfig.multi_class - None of the 3 SDKs reads extensions.multi_class_discovery from Config — the global toggle is unimplemented everywhere

Options - A Implement the global toggle: each SDK reads Config.get("extensions.multi_class_discovery", false) at registry init; per-class decorator/marker overrides - B Drop the global toggle: spec says per-class decorator is the only opt-in (matches Python today) - C Make it explicit per-call: keep TS+Rust function-param style; remove the global config key entirely

Recommendation: B. Per-class decorator (Python's design) is more composable and easier to reason about (each class declares its own intent). The global toggle is dead documentation today.

Action: - Remove the global extensions.multi_class_discovery config key from PROTOCOL_SPEC + multi-module-discovery.md - TS discoverMultiClass(filePath, classes, extensionsRoot) — drop the multiClassEnabled arg (TS still needs the per-class marker; document how to pass it) - Rust DiscoveryConfig — keep multi_class for explicit-config use, but document as Rust-only convenience for callers that bypass the per-class marker


D-07 — FrequencyExceededError vs CallFrequencyExceededError

Status quo - docs/features/call-chain-guard.md:206 (Contract block) lists FrequencyExceededError(code=FREQUENCY_EXCEEDED) - The same file's Error Types table at line 92-96 lists CallFrequencyExceededError(code=CALL_FREQUENCY_EXCEEDED) - All 3 SDKs implement CallFrequencyExceededError with code CALL_FREQUENCY_EXCEEDED

Options - A Fix the doc Contract block (canonical name = CallFrequencyExceededError) - B Rename in all 3 SDKs to match the Contract block (FrequencyExceededError)

Recommendation: A. Implementation + Error Types table + ACL/spec usage all agree on CallFrequencyExceededError. Only the Contract block heading is stale. Single-line doc fix.

Action: edit docs/features/call-chain-guard.md:206 Contract block heading to CallFrequencyExceededError(code=CALL_FREQUENCY_EXCEEDED).


D-08 — RetryConfig.compute_delay_ms method name canonicalization

Status quo - Python: compute_delay_ms(attempt) returns float ms - TS: computeDelay(attempt) returns number ms - Rust: delay_for_attempt(attempt) returns u64 ms

All three produce identical numerical output for integer attempts. Only the method name differs.

Options - A Pin compute_delay_ms as canonical (Python current). Rename TS+Rust. - B Pin compute_delay (TS-style, drop unit suffix). Rename Python+Rust. - C Pin delay_for_attempt (Rust-style). Rename Python+TS.

Recommendation: A (compute_delay_ms). The unit suffix _ms is helpful (TS and Python both use ms units already; the suffix avoids ambiguity).

Action: - TS: rename computeDelay → computeDelayMs. Add computeDelay as deprecated alias for one minor version. - Rust: rename delay_for_attempt → compute_delay_ms. Same pattern.


D-09 — APCore lifecycle: close() vs start() vs stop()

Status quo - Python: only close() (releases the cached event loop). No start(), no stop(). - TS: no close(), no start(), no stop(). - Rust: no close(), no start(), no stop(). Has reload() (Rust-only). - Spec text mentions start() and stop() but no SDK implements either.

Options - A Drop start()/stop() from spec, document close() as Python-only convenience - B Add start()/stop() to all 3 SDKs (no-op default, override-able for async setup) - C Standardize on async shutdown() (TS+Rust gain it; Python close() remains)

Recommendation: A. start() and stop() are aspirational and have no clients. Python's close() is mainly for tests cleaning up. No real lifecycle need exists in the 3 SDKs as currently designed.

Action: remove start() and stop() mentions from PROTOCOL_SPEC §12 and feature specs. Document Python close() as a Python-only convenience for releasing the cached event loop.


D-10 — TaskStore protocol method names: put vs save, list_expired presence

Status quo - Python: get / put / delete / list — uses put, lacks list_expired - TS: save / get / list / delete / listExpired — full spec surface - Rust: save / get / list / delete / list_expired — full spec surface - Spec contract requires save / get / list / delete / list_expired

Options - A Align Python with spec: rename put → save, add list_expired. Add deprecated alias put calling save for one minor version. - B Change spec + TS+Rust to use put (Python-style) and drop list_expired from spec

Recommendation: A. TS and Rust already match the spec; Python is the outlier. The rename is a 1-day fix with deprecation alias.

Action: - Rename Python TaskStore.put → save, add deprecation shim - Add TaskStore.list_expired(before_timestamp) to Python (mirrors TS+Rust) - Update InMemoryTaskStore and any tests - CHANGELOG ### Changed for v0.21.0


D-11 — start_reaper signature alignment

Status quo - Python: start_reaper(interval_seconds=3600.0, max_age_seconds=3600.0) — sync, returns None, args swapped, units in seconds - TS: startReaper({ttlSeconds, sweepIntervalMs}) — async, returns ReaperHandle, sweepIntervalMs in ms - Rust: start_reaper(config: ReaperConfig{ttl_seconds, sweep_interval_ms}) — sync (returns ReaperHandle), ttl in seconds, sweep in ms

Options - A Standardize on (ttl_seconds: u64, sweep_interval_ms: u64) -> ReaperHandle. Rename Python's args; switch sweep unit to ms; return ReaperHandle. - B Take a ReaperConfig struct (Rust-style) everywhere; Python dataclass, TS object.

Recommendation: A. Two named arguments are simpler than a config struct for a 2-field signature. Python is the outlier on units (seconds vs ms) and on return type (None vs ReaperHandle).

Action: - Python: rename interval_seconds → sweep_interval_ms (multiply previous values by 1000); rename max_age_seconds → ttl_seconds; return ReaperHandle. Add deprecation alias for old args. - Cross-SDK: ensure ReaperHandle.stop() is async in TS+Rust+Python.


D-12 — TaskStatus enum: drop Python's RETRYING?

Status quo - Python: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, RETRYING (extra) - TS: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED - Rust: Pending, Running, Completed, Failed, Cancelled

Python sets RETRYING during backoff; TS+Rust set it back to PENDING.

Options - A Remove Python's RETRYING; use PENDING during backoff (matches TS+Rust) - B Add RETRYING to TS+Rust spec - C Keep RETRYING but document as a Python-only intermediate state that observers should treat as PENDING

Recommendation: A. Spec lists 5 states; Python's RETRYING is an internal observability shim that leaks into the public API. Cleaner to use PENDING for the backoff window and expose retry count as a separate retry_count field (already present).

Action: Python task_info.status = TaskStatus.PENDING during backoff; remove RETRYING from the enum (or keep deprecated). Update tests + docs.


D-13 — TaskInfo.retry_count field name in Python

Status quo - Python: field is named attempt_number - TS: retryCount - Rust: retry_count - Spec contract: retry_count

Options - A Rename Python field to retry_count (with deprecated attempt_number property)

Recommendation: A. Single-field rename; trivial.

Action: edit Python TaskInfo dataclass; add @property attempt_number returning retry_count for one minor version.


D-14 — RetryConfig::default() in Rust: max_retries=3 vs spec max_retries=0

Status quo - Python: max_retries=0 - TS: maxRetries=0 - Rust: max_retries=3 (defaults to 3 retries automatically — surprises callers using ..Default::default()) - Spec: 0

Recommendation: change Rust default to 0. Single-line fix.

Action: edit apcore-rust/src/async_task.rs:193-202 Default impl. Tests update. CHANGELOG ### Changed.


D-15 — Registry.discover_multi_class: free function vs Registry method?

Status quo - Python: free function discover_multi_class(file_path, extensions_root, pre_approval_hook) - TS: free function discoverMultiClass(filePath, classes, extensionsRoot, multiClassEnabled) - Rust: split as Registry::register_multi_class(...) + derive_module_ids(...) free function - Spec contract: names it Registry.discover_multi_class (a method)

Options - A Add a Registry.discover_multi_class method on the Registry class in Python+TS, keep the free function as _discover_multi_class internal helper. Aligns surface with spec. - B Update spec to describe the function as a free helper (matches Python+TS today). Document Rust's split as a Rust-only convenience.

Recommendation: A. Spec authority dictates. The method form is also more discoverable (registry.discover_multi_class(file) reads better than from apcore.registry.multi_class import discover_multi_class).

Action: add Registry.discover_multi_class(file_path) method to Python+TS that wraps the free function. Mark the free function as internal (rename to _discover_multi_class in TS, leave Python module-private).


D-16 — Module.stream Rust signature in docs is wrong

Status quo - docs/features/streaming.md:81-109 shows Rust: async fn stream(...) -> Result<Vec<Value>, ModuleError> (returning a buffered Vec) - Actual Rust trait: fn stream(&self, ...) -> Option<ChunkStream> where ChunkStream is a Pin<Box<dyn Stream<...> + Send>>

Options - A Fix the doc to match the implementation

Recommendation: A. Documentation bug.

Action: rewrite the Rust example in streaming.md:81-146 to use StreamExt::next() polling.


D-59 — caller_id_for_unknown configurable?

Status quo - All 3 SDKs hardcode "@external" for missing caller_id - Spec implies it should be configurable

Options - A Add constructor param caller_id_for_unknown: str = "@external" to ACL in all 3 SDKs - B Pin "@external" as a constant in the spec; document as immutable

Recommendation: B. Configurability adds complexity for a value that's only used internally for ACL evaluation labeling. Compliance-driven users can wrap calls with their own caller_id resolver.

Action: edit acl-system.md to remove the configurability suggestion; add a constant EXTERNAL_CALLER_ID = "@external" to each SDK so it's discoverable.


D-60 — ACL priority field: implement deny-wins-at-equal-priority?

Status quo - Spec Algorithm A09: sort rules by priority, deny-before-allow at equal priority - ACLRule in all 3 SDKs has NO priority field - All 3 iterate in insertion order; add_rule inserts at index 0 (newer wins as a de-facto priority surrogate)

Options - A Add priority: int = 0 to ACLRule, implement sort + deny-tiebreak in all 3 SDKs - B Drop the priority+tiebreak language from Algorithm A09; document insertion-order-with-add-at-front as canonical

Recommendation: B. Insertion-order is simpler and matches all 3 implementations today. The deny-tiebreak is rarely a real-world ergonomic issue (users can always reorder rules). If priority becomes needed in v1.0, add it then.

Action: edit Algorithm A09 to drop sort+tiebreak steps; document insertion-order-first-match-wins.


D-58 — Stream chunk shape: dict-only vs any JSON?

Status quo - Python _deep_merge requires dict (TypeError on non-dict) - TS deepMergeChunk requires Record (silent replace at top level) - Rust deep_merge_value accepts any Value variant - Spec docs/streaming.md:228 says chunks are "partial output dicts"

Options - A Standardize: chunks must be objects (dicts/Records). Rust adds shape check; Python+TS already enforce. - B Allow any JSON value: relax Python+TS to accept arrays/scalars; standardize the merge as "replace if non-object on either side, deep-merge if both objects".

Recommendation: A. The merge semantics for non-object chunks are unclear (replace? append?), and most modules emit objects naturally.

Action: Rust adds a is_object() check before deep_merge_value; raise InvalidInputError on non-object chunk. Spec text already implies this.


D-61 — compute_delay rounding for fractional values

Outcome: decided — keep current behaviour. The u64 truncation is documented in docs/features/async-tasks.md (RetryConfig); the proposed rustdoc note on RetryConfig::compute_delay_ms was not added, and apcore-rust carries only an inline code comment.

Status quo - Python returns float ms - TS returns number ms - Rust returns u64 ms (truncates fractional component)

For backoff_multiplier=2.5 and retry_delay_ms=1000, attempt=2: Python/TS return 6250.0, Rust returns 6250 (lossless). For backoff_multiplier=1.7 and attempt=3: Python/TS return 4913.0, Rust returns 4913. No realistic divergence at default values, but precision differences exist for non-integer multipliers at high attempts.

Recommendation: keep current behavior. Document Rust's u64 return as "ms truncated to integer" — a no-op divergence in practice.

Action: no code change. Add a one-line note in RetryConfig::compute_delay_ms doc comment.


D-62 — apply() idempotency for ExtensionManager

Outcome: superseded by D-78 (spec v1.49.0): apply retains the store. apcore-rust's ExtensionKind now holds Arc<dyn …> handles and apply clones them instead of draining.

Status quo - Python+TS: apply() preserves registered extensions; second call re-stacks - Rust: apply() drains extensions; second call is a no-op (CRITICAL EXT-001)

Options - A Migrate Rust ExtensionKind from Box<dyn Trait> to Arc<dyn Trait>; rewrite apply() to use clone() semantics. Cascading API changes to Executor::set_acl/set_approval_handler/use_middleware and Registry::set_discoverer/set_validator.

Recommendation: A. Required for cross-language parity, but it's a multi-API breaking change. Track as RFC + epic for v0.21.0 or v0.22.0. (Already deferred from round-3 fix cycle.)

Action: open an RFC issue. Schedule agent in 2 weeks to draft the migration plan.


D-63 — ExtensionManager.get/get_all/unregister API

Outcome: resolved. apcore-rust's ExtensionManager exposes get, get_all and unregister; their contracts were later settled by D-91 (a reachable removal path), D-108 (unknown point name is an error) and D-128 (removal by identity).

Status quo - Python+TS: present - Rust: missing (replaced with count/has/clear/clear_all)

Options - A Bundle with D-62 Arc migration. Add the spec API alongside.

Recommendation: A (paired with D-62).


D-23 — RefResolver max_depth integration

Status quo (post-fix) - Round-3 added RefResolver::with_max_depth and depth tracking in resolve_inner. The default constructor uses 32. Resolved.

Status: resolved in commit 5914dd5. Listed for trace.


D-24 — update_config constraint registry & rollback

Outcome: resolved as Option A. apcore-typescript (sys-modules/control.ts, _validatePostSet) and apcore-rust (sys_modules/control.rs, Config::validate_key_constraint) check the registered constraint after the set and roll back to the old value on failure, as apcore-python does.

Status quo - Python: full _CONSTRAINTS table with rollback on validation failure - TS+Rust: no constraint registry, no rollback path; invalid values silently persist - Spec MUST: rollback on ConfigError postcondition

Options - A Port Python's _CONSTRAINTS table + post-set validation + rollback to TS+Rust - B Drop the rollback requirement from spec (treat as Python-only safety net)

Recommendation: A. Spec contract is clear; rollback is a real protection against bad config writes. Implement in TS+Rust.

Action: - TS: add _constraints Map and _validate_post_set to update_config module; rollback via Config.set(key, old_value) on validation failure - Rust: same pattern using a static constraints registry


D-25 — update_config restricted-key error code

Status quo - Spec: CONFIG_KEY_RESTRICTED - Python: matches spec - TS: raises ConfigError (no specific code) - Rust: returns ModuleError(GeneralInvalidInput) (no specific code)

Recommendation: align TS+Rust to use CONFIG_KEY_RESTRICTED.

Action: TS adds ErrorCodes.CONFIG_KEY_RESTRICTED; Rust adds ErrorCode::ConfigKeyRestricted variant. Update update_config to use it.


D-26 — Identity hashability

Status quo - Python: claims frozen but unhashable (dict field). hash(identity) raises TypeError. - TS: interface, no equality helper - Rust: full Hash impl

Options - A Make Identity hashable everywhere: Python uses tuple-of-tuples or FrozenDict for attrs; TS adds identityEquals/identityHash helpers - B Document Identity as not-required-to-be-hashable; Rust's Hash impl is a Rust-only convenience

Recommendation: B. Cross-language hashability requires changing Python's attrs to a frozen-dict type that downstream Python code might find unfamiliar. Not worth the complexity for an unclear use case.

Action: edit identity-system.md to clarify Identity equality semantics: "Identity is a value type; equality is structural (id+type+roles+attrs); hashability is implementation-defined per language."


D-27 — UsageCollector trend / period filtering / record timestamp

Status quo - Python+TS: full implementation (trend computed, record accepts timestamp, summary accepts period) - Rust: trend hardcoded "stable", record ignores timestamp, summary has no period filter

Options - A Port Python/TS trend computation + period filter + record timestamp param to Rust

Recommendation: A. Core spec functionality. Should be done in Rust v0.21.0.

Action: implement in Rust UsageCollector. Track as 3 separate fix issues (OBS-001, OBS-002, OBS-003 already exist).


D-28 — ContextLogger output schema (Rust uppercase + flattened extra)

Status quo - Python+TS: lowercase level, nested extra key, module_id field - Rust: UPPERCASE level, flattened extra (no extra key wrapper), module field (not module_id)

Options - A Align Rust to Python+TS output shape

Recommendation: A. Log aggregators need consistent field names and casing.

Action: edit apcore-rust/src/observability/logging.rs to lowercase level_name, nest extra under extra key, rename module → module_id and input → inputs in middleware extras.


D-29 — EventEmitter.shutdown parity (already partially fixed)

Status quo (post-round-2) - Round-2 added shutdown() to Rust events. Python had it. TS gained it. - Spec parity now achieved.

Status: resolved in round-2 commits.


D-30 — discover_multi_class pre_approval_hook Python-only param

Status quo - Python's discover_multi_class accepts a third pre_approval_hook parameter for file-import safety; TS+Rust don't have it (they don't import files at runtime — caller pre-resolves).

Options - A Document as Python-only convenience: Python imports, the hook is its safety check; TS+Rust callers handle file safety themselves - B Add equivalent hook to TS+Rust (e.g., a path-allowlist check before reading the file system)

Recommendation: A. Python's hook protects against importing arbitrary code; TS+Rust never import code from disk for this path. The asymmetry reflects real architectural difference.

Action: document in multi-module-discovery.md that pre_approval_hook is a Python-only construct; TS+Rust callers should sandbox file reads.


D-31 — File-extension scope for discovery

Status quo - Python: .py only - TS: .ts and .js (skip .d.ts, .test.*, .spec.*) - Rust: [".rs"] (configurable via with_extensions) - Spec: silent

Options - A Document the per-language file-extension defaults explicitly in multi-module-discovery.md - B Make extensions a config knob in all 3 SDKs (already in Rust; add to Python+TS)

Recommendation: A. Sensible defaults per language are unsurprising. Document the differences and the test-file skip patterns.

Action: add a "File extensions and skip patterns" section to multi-module-discovery.md.


D-33 — Trace context W3C alignment

Status: resolved (Issue #35).

Status quo - TraceContext.extract only looked up the lowercase traceparent key, so callers passing Traceparent (Werkzeug/Express) silently produced a fresh trace_id. - TraceContext.inject hardcoded the sampling flag to 01, breaking propagation of an upstream 00 (unsampled) decision. - tracestate was not parsed or re-emitted at all, dropping vendor-specific routing hints across service boundaries. - inject() had no escape hatch for callers that manage their own span ids and need to pin the outgoing parent_id.

Decision - extract() performs case-insensitive header lookup for both traceparent and tracestate; the parsed tracestate is an ordered list of (key, value) pairs capped at 32 entries with malformed entries dropped silently. - extract→inject is lossless for the trace_flags byte and for the tracestate list. - inject(ctx, parent_id?) accepts an optional parent_id validated against ^[0-9a-f]{16}$; non-matching values raise INVALID_PARENT_ID. - Spec lives in docs/features/observability.md §"W3C Alignment Rules"; conformance in conformance/fixtures/trace_context.json (8 cases). PROTOCOL_SPEC §10.5 is unchanged (the new rules are extract/inject implementation rules, not Context construction rules).

Action: SDK changes ship in apcore-python, apcore-typescript, apcore-rust against the same fixture file.


D-32 — Discovery pipeline stage count alignment

Status quo - Spec doc references "8 stages" (matches Rust default_discoverer.rs) - Python _discover_default doc claims 7 stages, actually has 8 helpers - TS _discoverDefault has only 6 helpers (conflict batching folded into _registerInOrder)

Options - A Refactor TS to expose the 8-stage shape explicitly (extract _filterIdConflicts as a separate stage) - B Update spec doc + Python docstring to "6–8 stages, language-dependent"; document that conflict batching MAY be inlined

Recommendation: A. The 8-stage breakdown matches the spec algorithm A04 better; TS just inlined for code golf and lost the conformance signal.

Action: refactor TS _discoverDefault to expose _filterIdConflicts and _registerInOrder as separate stages.


D-34 — Event naming canonicalization

Status: resolved

Status quo - Registry bridge emits module_registered / module_unregistered (no apcore. prefix) - PlatformNotifyMiddleware emits apcore.error.threshold_exceeded / apcore.latency.threshold_exceeded — error and latency are not subsystems, they are categories - Other framework events already follow apcore.<subsystem>.<event> (e.g., apcore.config.updated, apcore.module.toggled) - Subscribers cannot reliably glob by subsystem (apcore.health.* misses both threshold variants and registry events)

Options - A Rename to canonical form (apcore.registry.module_registered, apcore.health.error_threshold_exceeded, apcore.health.latency_threshold_exceeded) and dual-emit legacy names with deprecated:true for one minor cycle, removing legacy in v0.22.0 - B Keep existing names; document the inconsistency

Recommendation: A. Glob filtering by subsystem is the documented subscriber pattern; the inconsistency was an accidental drift. Dual-emit gives subscribers one minor-version cycle to migrate.

Action: emit canonical names in all 3 SDKs; dual-emit legacy names with data.deprecated: true during v0.21.x; remove legacy in v0.22.0. Spec recorded in docs/features/event-system.md § "Event Naming Convention"; conformance in conformance/fixtures/event_naming.json (8 cases).


D-35 — Contextual auditing for control plane

Status: resolved

Status quo - §1.2 (System Modules Hardening) already defines AuditEntry.actor_id extraction from context.identity.id and persistence via the optional AuditStore - The event-bus payload (apcore.config.updated, apcore.module.toggled, apcore.module.reloaded) does not carry caller_id or any identity snapshot today — real-time subscribers must cross-reference the audit store to know who made the change - When the caller is unauthenticated, no event field signals the absence of an identity (handlers cannot distinguish "no caller" from "caller field forgotten")

Options - A Extend audit event payloads with caller_id (defaulting to "@external" when unauthenticated) and an optional redacted identity snapshot — same data the AuditStore already records, mirrored on the event bus - B Require subscribers to query the AuditStore when they need actor context — keeps event payloads minimal but creates a hard dependency on AuditStore availability - C Embed the entire Context in the event payload — wasteful and leaks unrelated data

Recommendation: A. The cost is two extra fields (caller_id + optional identity); the benefit is real-time subscribers (Slack notifier, SIEM forwarder) becoming standalone. AuditStore parity is already enforced — both surfaces draw from the same in-memory snapshot.

Action: - Update docs/features/system-modules.md with a "Contextual Auditing" subsection making the rule normative. - All 3 SDKs populate caller_id and (when context.identity is set) a redacted identity snapshot in audit event payloads emitted by update_config, toggle_feature, reload_module. - caller_id defaults to the literal string "@external" when context.caller_id is None/null/"". - Sensitive Identity fields (those marked x-sensitive: true) MUST be replaced with "<redacted>". - Conformance recorded in conformance/fixtures/contextual_audit.json (7 cases).


D-36 — Pipeline StepMiddleware

Status quo - core-executor.md §1.3 documents step-level middleware as a next-callback wrapper (step_middleware(name, handler) style). - A separate, finer-grained extension point with the same lifecycle shape as module-level Middleware (before_step / after_step / on_step_error) was needed so SDK authors and AI integrators could reuse the existing onion-model mental model and so async callbacks could be uniformly detected per language.

Options - A Keep only the next-callback API and document the lifecycle behavior implicitly through the wrapper. - B Ship a parallel lifecycle-shaped StepMiddleware API (before_step/after_step/on_step_error) alongside the wrapper, with normative onion ordering and recovery semantics that mirror module-level middleware exactly.

Recommendation: B. The wrapper API stays for ergonomic step inspection; the lifecycle API is what conformance fixtures and AI-introspection target. Both compile to the same internal step-execution loop.

Resolution: resolved. docs/features/middleware-system.md "Pipeline Step Middleware (Issue #33)" section documents the lifecycle, recovery contract (on_step_error returning non-null = recovery, mirroring module-level), onion ordering across multiple registrations, async-callback support per SDK, and three contract blocks. Conformance: conformance/fixtures/pipeline_step_middleware.json (6 cases).


D-37 — Pipeline configuration fail-fast

Status quo - Some pre-Issue-#33 SDK behavior tolerated unknown step names in pipeline.configure[] directives by logging a warning and continuing. - Step requires/provides capability declarations could be left unsatisfied without surfacing a typed error until first call().

Options - A Continue to log warnings; first call() produces a confusing low-level error. - B Fail fast at YAML parse time (ConfigurationError) for missing step references, and fail fast at strategy construction (PipelineDependencyError) for unmet requires/provides.

Recommendation: B. Misconfiguration must surface during application startup, not under load. Strategy construction is all-or-nothing.

Resolution: resolved. Documented as the "Configuration safety" subsection inside docs/features/middleware-system.md "Pipeline Step Middleware (Issue #33)". Conformance: conformance/fixtures/pipeline_failfast_config.json (3 cases) covering both error codes and the satisfied-requires happy path. (Was 4: the pipeline.step_middleware case was removed in the 0.26 sweep because that configuration section exists in no SDK and is not declared by the canonical schema — apcore#80.)


D-38 — BatchSpanProcessor cross-SDK parity

Status quo - TypeScript and Rust SDKs ship a non-blocking BatchSpanProcessor aligned with OpenTelemetry conventions. - Python initially shipped only the synchronous SimpleSpanProcessor, blocking the caller per span exported. This was an observability-hot-path regression at sustained throughput.

Options - A Defer Python BatchSpanProcessor; rely on SimpleSpanProcessor plus user-side queuing. - B Implement Python BatchSpanProcessor with identical default tunables (max_queue_size=2048, max_export_batch_size=512, schedule_delay_ms=5000, export_timeout_ms=30000), identical lifecycle (on_end → force_flush → shutdown), and identical drop-on-full semantics so cross-language fixtures pass without per-SDK conditionals.

Recommendation: B. The deeper §1.2 spec already prescribed the contract; Python parity closes the gap.

Resolution: resolved. docs/features/observability.md "Batch span processing" section restates the cross-SDK parity contract with default-tunables table, lifecycle table, and Python/TypeScript/Rust usage tabs. Existing conformance fixture observability_hardening.json (Issue #43) covers BatchSpanProcessor buffering and drop-on-full-queue behavior; no new fixture needed.


D-41 — Async middleware correctness (return-value detection)

Status quo (pre-resolution) - Python+TS gated awaiting on function-shape: inspect.iscoroutinefunction(handler) / handler.constructor.name === 'AsyncFunction'. - Wrapped handlers — functools.partial(async_fn, ...), factory closures returning a coroutine, decorated class methods rebound onto instances — are not literally async-declared but DO return coroutines/Promises when called. - Function-shape detection silently dropped these returns; no await, no error, no log. Promises leaked. - Rust unaffected: #[async_trait] enforces the Future return type at the type level — the bug class is impossible.

Resolution: Implementations MUST inspect the return value of every middleware invocation. If the return is awaitable / thenable, the manager MUST await it. Function-shape checks are a fast-path optimization, not the gate.

Status: resolved in iter5. See docs/features/middleware-system.md "## Async middleware correctness". Conformance: function-shape unchanged for async def handlers; the new path catches partial-wrapped handlers and arrow-factory closures.

Action (completed): - Python: inspect.isawaitable(result) after invocation; await if true. - TypeScript: thenable check on the return value; await if thenable. - Rust: no change — async_trait already enforces correctness.


D-42 — Reaper signature alignment (D-11 closeout)

Status quo (pre-resolution) - Python: start_reaper(interval_seconds=3600.0, max_age_seconds=3600.0) — sync, returns None, sweep unit in seconds. - TS: startReaper({ttlSeconds, sweepIntervalMs}) — async, returns ReaperHandle, sweep unit in milliseconds. - Rust: start_reaper(ReaperConfig { ttl_seconds, sweep_interval_ms }) — returns ReaperHandle.

Resolution: Canonical signature start_reaper(ttl_seconds, sweep_interval_ms) -> ReaperHandle everywhere (D-11 Option A). Python's old kwargs interval_seconds / max_age_seconds are kept as deprecated aliases that emit DeprecationWarning; interval_seconds value is multiplied by 1000 for unit conversion. Scheduled for removal in next MAJOR.

Status: resolved in iter5. See docs/features/async-tasks.md "Canonical signature" + "Python deprecation note".

Action (completed): Python alias layer added; cross-language ReaperHandle.stop() is async everywhere. CHANGELOG entry under "### Changed".


D-43 — Granular reload via path_filter (Issue #45.4 closeout)

Status quo (pre-resolution) - system.control.reload_module accepted only a single module_id. Bulk reload required a manual loop over IDs at the caller, with no dependency-order guarantee.

Resolution: Added optional path_filter glob input. Mutually exclusive with module_id (MODULE_RELOAD_CONFLICT if both present). Zero-match filter is a no-op (no error). Reload order follows dependency topological order (leaf modules first).

Status: resolved in iter5. See docs/features/system-modules.md §1.4 and conformance/fixtures/reload_path_filter.json.

Action (completed): spec + fixture in apcore. SDKs implement in v0.21.0.


D-44 — Rust Config::reload_from_disk() (Issue #45.5 closeout)

Status quo (pre-resolution) - Python and TypeScript can re-read apcore.yaml by reconstructing Config and rebuilding the client. Borrow rules make this awkward in Rust; long-lived binaries had no equivalent for live config refresh.

Resolution: Rust SDK adds Config::reload_from_disk() that re-reads the original YAML path + any overrides_path overlay atomically. Emits apcore.config.reloaded on success. Restricted keys (e.g. sys_modules.enabled) are ignored on reload. Python and TypeScript are unaffected — they keep the rebuild pattern.

Status: resolved in iter5. See docs/features/system-modules.md "Rust-only: Config::reload_from_disk()".

Action (completed): Rust-only spec note. CHANGELOG entry under "### Added".


D-45 — Error fingerprinting in ErrorHistory (Issue #43 §4 closeout)

Status quo (pre-resolution) - ErrorHistory deduplicated on (code, message). Any message containing a UUID, timestamp, or numeric ID created a fresh entry per occurrence — the ring buffer flooded with near-identical errors and meaningful patterns were buried.

Resolution: Replace the tuple key with SHA-256(error_code + ':' + top_frame_hash + ':' + sanitized_message_template). Sanitization: UUIDs → <UUID>, ISO 8601 timestamps → <TIMESTAMP>, integers ≥ 4 digits → <ID>, lowercase, trim. Same fingerprint = increment count + update last_seen_at. Different error_code never collapses; different top-frame call site never collapses (even with identical normalized message).

Status: resolved in iter5. See docs/features/observability.md "## Error fingerprinting" and §1.4. Fixture: conformance/fixtures/error_fingerprinting.json.

Action (completed): spec + fixture in apcore. CHANGELOG entry under "### Added".


D-46 — Redaction configuration (Issue #43 §5 closeout)

Status quo (pre-resolution) - ContextLogger redacted only fields whose name had the literal _secret_ prefix. This was hardcoded, undiscoverable, required app-code rename to opt fields in, and could not match real-world conventions like Authorization / X-API-Key.

Resolution: Add obs.redaction.regex_patterns (full-match value regex) and obs.redaction.sensitive_keys (case-insensitive substring against field names) Config keys. Default sensitive_keys covers password, passwd, secret, token, api_key, apikey, access_key, private_key, authorization, auth, credential, cookie, session, bearer. Union with existing x-sensitive schema annotations. trace_id, caller_id, target_id, module_id, span_id MUST NEVER be redacted. The _secret_ prefix is deprecated for backward compatibility.

Status: resolved in iter5. See docs/features/observability.md "## Redaction configuration" and §1.5. Fixture: conformance/fixtures/redaction_config.json.

Action (completed): spec + fixture in apcore. CHANGELOG entry under "### Added".


Resolution status

Final state, verified against apcore-python, apcore-typescript and apcore-rust 0.31.0. The per-round narratives are preserved below in chronological addenda.

  • Resolved (56 items):
  • D-01, D-02, D-03, D-04, D-05, D-07, D-08, D-09, D-10, D-11, D-12, D-13, D-14, D-15, D-16, D-23, D-24, D-25, D-26, D-27, D-28, D-29, D-30, D-31, D-32, D-33, D-34, D-35, D-36, D-37, D-38, D-39, D-40, D-41, D-42, D-43, D-44, D-45, D-46, D-47, D-48, D-49, D-50, D-51, D-52, D-53, D-54, D-55, D-56, D-57, D-58, D-59, D-60, D-61, D-63, D-64
  • Notes on follow-through chains:
    • D-08 closed via D-49 (TS + Rust renamed to canonical compute_delay_ms).
    • D-11 closed via D-42 (Python start_reaper aliases + ms units).
    • D-32 closed via D-56 (TS _filterIdConflicts extracted).
  • Doc-only follow-throughs landed in iter-9 (2026-05-05): D-01, D-07, D-09, D-16, D-59, D-60, D-26 — see addendum below.
  • D-03 resolved 2026-09-05 (during a cross-repo consistency audit, not the original iter rounds): caller_id and action added to ApprovalRequest in all 3 SDKs, populated at each SDK's existing BuiltinApprovalGate construction site. The entry's "target v0.21.0" was stale by then — that version had already shipped with unrelated content — so all three SDKs landed it under their in-progress version instead. docs/spec/protocol-spec.md §7.3.1's schema, which never listed either field, was corrected the same day as spec v1.32.0. Conformance: conformance/fixtures/approval_request_fields.json.
  • Closed after the 2026-05 rounds (each entry carries an Outcome line):

    • D-04 — the error wire form is snake_case in all three SDKs (TypeScript ModuleError.toJSON(), sync finding A-D-008).
    • D-24 — TypeScript and Rust update_config validate the registered constraint and roll back on failure.
    • D-61 — decided as "keep current behaviour"; the truncation is documented in docs/features/async-tasks.md.
    • D-63 — apcore-rust ExtensionManager exposes get / get_all / unregister.
    • D-64 — ACL.discover(config) shipped in all three SDKs in release 0.25.0.
  • Superseded (2 items):

  • D-06 — by D-107 (spec v1.50.0): per-class markers are the only multi-class opt-in in every SDK.
  • D-62 — by D-78 (spec v1.49.0): ExtensionManager.apply retains the store.

  • Open (1 item):

  • D-65 — include: cross-file config composition. The RFC remains Proposed; nothing is implemented.

Resolution status — 2026-05-03 addendum

Status updates landed since the original 2026-05-02 sync:

  • D-10 — resolved. Python TaskStore.put renamed to save; deprecated put alias retained for one minor version. list_expired(before_timestamp) added to Python TaskStore and InMemoryTaskStore. TS+Rust were already aligned.
  • D-12 — resolved. Python TaskStatus.RETRYING removed from the public enum; backoff-window tasks remain in PENDING with retry_count > 0, matching TypeScript and Rust.
  • D-13 — resolved. Python TaskInfo.attempt_number renamed to retry_count; attempt_number retained as a deprecated read-only @property alias.
  • D-14 — resolved. Rust RetryConfig::default() now returns max_retries = 0, matching Python+TS and the spec. Existing callers must opt in to retries explicitly.
  • D-15 — resolved. Python and TypeScript both expose Registry.discover_multi_class / Registry.discoverMultiClass as methods. The free-function form is retained as an internal helper. Rust's split (Registry::register_multi_class + derive_module_ids) remains; the spec contract is satisfied by the method form in all 3 SDKs (Rust's discover_multi_class method wraps register_multi_class).
  • D-58 — resolved. Rust streaming chunk merge raises STREAM_CHUNK_NOT_OBJECT for non-object chunks before invoking deep_merge_value, aligning with Python+TS shape requirements.
  • D-25 — resolved. update_config raises CONFIG_KEY_RESTRICTED for restricted keys in Rust (and TS — TS half landed as part of the round). Python was already aligned.
  • D-27 — resolved. Rust UsageCollector now computes trend from samples (replacing the hardcoded "stable"), accepts an optional timestamp on record(), and supports period filtering on get_summary().
  • D-28 — resolved. Rust ContextLogger output schema aligned with Python+TS: lowercase level, nested extra key wrapper, module_id field name (was module), inputs field in middleware extras (was input).

The items still open on 2026-05-03 (D-04 TS snake_case rename, D-62/D-63 ExtensionManager Arc migration, D-32 TS pipeline-stage refactor) have all since closed — see Resolution status.

Resolution status — iter-8 addendum (D-47..D-53)

Status updates landed in the iter-8 sync alignment round:

  • D-47 — resolved. OverridesStore is now a Protocol (Python) / trait (Rust) / interface (TypeScript) in all 3 SDKs; FileOverridesStore and InMemoryOverridesStore ship as defaults.
  • D-48 — resolved. Reaper sweep_interval_ms defaults to 300_000 ms (5 minutes) in all 3 SDKs, matching the spec normative rule.
  • D-49 — resolved. RetryConfig method name canonicalized to compute_delay_ms (Python) / computeDelayMs (TypeScript) / compute_delay_ms (Rust). Old names (computeDelay, delay_for_attempt) retained as deprecated aliases; removal target v0.22.0.
  • D-50 — resolved. Rust TraceContext::inject now reads _apcore.trace.flags from context data and propagates inbound trace_flags, matching Python+TypeScript.
  • D-51 — resolved. Rust TraceContext::inject rejects malformed parent_id overrides with INVALID_PARENT_ID, matching Python+TypeScript.
  • D-52 — resolved. Rust pipeline now raises distinct ConfigurationError (YAML parse time, unknown step) and PipelineDependencyError (strategy-construction time, unsatisfied requires/provides) error codes, matching Python+TypeScript.
  • D-53 — resolved. TypeScript RedactionConfig.fromConfig now reads canonical obs.redaction.regex_patterns and obs.redaction.sensitive_keys; legacy observability.redaction.field_patterns / observability.redaction.value_patterns honored for one minor cycle with a deprecation warning.

D-39 — StorageBackend cross-SDK abstraction

Status quo (resolved)

Prior to this round the persistence surface for ErrorHistory, UsageCollector, and MetricsCollector was per-collector and inconsistent across SDKs. Issue #43 §1.1 introduced the higher-level ObservabilityStore; this decision adds the shared lower-level primitive that all three collectors plug into.

Decision

All three SDKs ship a StorageBackend trait/interface/protocol (4 methods: save, get, list, delete) and an InMemoryStorageBackend default implementation. ErrorHistory, UsageCollector, and MetricsCollector accept an optional injected backend at construction time; when omitted, InMemoryStorageBackend is used.

apcore SDKs do not ship Redis, Postgres, or S3 backends — those are explicitly out-of-tree. Users implement StorageBackend against their preferred client library.

Status: resolved. See docs/features/metrics-and-usage.md § Pluggable storage backends and conformance/fixtures/storage_backend.json.


D-40 — TS overrides persistence parity

Status quo (resolved)

Issue #45 §1.1 introduced the overrides_path / OverridesStore mechanism for system.control.update_config and system.control.toggle_feature. Python and Rust shipped file-backed persistence in v0.20; TypeScript was the outlier with in-memory-only behavior, breaking cross-SDK parity for runtime control.

Decision

TypeScript SDK adds OverridesStore interface, FileOverridesStore (YAML-backed at the configured path), and InMemoryOverridesStore (for tests). The startup path applies overrides_store.get_all() on top of base config in all 3 SDKs. Missing override path on first run is treated as an empty store (no error) — the file is created lazily on the first save.

Status: resolved. See docs/features/system-modules.md § Persistent Overrides and conformance/fixtures/overrides_store.json.


D-47 — OverridesStore cross-SDK trait/interface/protocol parity

Status quo (pre-resolution) - D-40 closed the existence gap (TypeScript shipped OverridesStore), but the surface was not yet uniformly pluggable across the 3 SDKs: - TypeScript exposed OverridesStore as a structural interface that APCore accepted. - Python exposed only the concrete FileOverridesStore / InMemoryOverridesStore classes; users wishing to plug in a custom backend (Redis, etcd, KMS-backed) had to subclass an internal class rather than implement a documented Protocol. - Rust exposed only the two concrete structs; there was no public trait OverridesStore consumers could implement. - This meant the cross-SDK trait/interface/protocol form documented in docs/features/system-modules.md was honored only by TypeScript.

Resolution - Python: OverridesStore is now a typing.Protocol (runtime-checkable) with the four canonical methods (save, get, get_all, delete). FileOverridesStore and InMemoryOverridesStore ship as defaults and remain the recommended choices. - Rust: OverridesStore is now a public trait (with Send + Sync bounds) over the same four methods. FileOverridesStore and InMemoryOverridesStore implement the trait; APCore::with_overrides_store accepts Arc<dyn OverridesStore>. - TypeScript: unchanged — already exposed the interface form.

Status: resolved. See docs/features/system-modules.md § "Persistent Overrides — pluggable OverridesStore" (Python/TypeScript/Rust tabs all show interface/trait/protocol form).


D-48 — Reaper sweep_interval_ms default alignment

Status quo (pre-resolution) - D-11/D-42 standardized the signature start_reaper(ttl_seconds, sweep_interval_ms) -> ReaperHandle across the 3 SDKs but left default values implicit. In practice each SDK shipped a slightly different default sweep cadence (Python kept the historical 60_000 ms in some helpers; Rust used 600_000 ms in one builder; TypeScript matched the spec at 300_000 ms).

Resolution - All 3 SDKs now default sweep_interval_ms to 300_000 (5 minutes), matching the normative rule in docs/features/async-tasks.md §1.3 ("Default ttl_seconds: 3600 (1 hour). Default sweep_interval_ms: 300000 (5 minutes)."). - ttl_seconds default of 3600 was already aligned in the previous round.

Status: resolved. See docs/features/async-tasks.md §1.3 normative rules and ## Contract: AsyncTaskManager.start_reaper Inputs section.


D-49 — D-08 follow-through: rename TS+Rust to canonical compute_delay_ms

Status quo (pre-resolution) - D-08 picked compute_delay_ms as the canonical method name on RetryConfig, but only the spec text was updated; TypeScript still exposed RetryConfig.computeDelay(attempt) and Rust still exposed RetryConfig::delay_for_attempt(attempt).

Resolution - TypeScript: method renamed to computeDelayMs(attempt). computeDelay(attempt) retained as a deprecated alias that forwards to computeDelayMs and emits a one-shot deprecation warning. Removal target: v0.22.0. - Rust: method renamed to compute_delay_ms(attempt). delay_for_attempt(attempt) retained as a #[deprecated] thin wrapper. Removal target: v0.22.0. - Python: already canonical (compute_delay_ms), unchanged.

Status: resolved. Method-name parity table added to docs/features/async-tasks.md §1.2 RetryConfig section.


D-50 — Rust trace inject inbound flag propagation

Status quo (pre-resolution) - The W3C Alignment Rules in docs/features/observability.md (D-33) require that inject() emit the same trace_flags byte that extract() parsed from the incoming traceparent, so the upstream sampling decision is preserved end-to-end. - Python read _apcore.trace.flags from context.data (populated by extract()) and emitted it on inject(). - Rust hardcoded 01 on inject() regardless of inbound flags, silently overriding upstream 00 (unsampled) decisions.

Resolution - Rust TraceContext::inject now reads _apcore.trace.flags from context.data (the same key Python uses) and falls back to 01 only when the key is absent. Behavior now matches Python+TypeScript.

Status: resolved. See docs/features/observability.md "W3C Alignment Rules" §"Dynamic trace_flags honoring" (already normative; Rust now implements it).


D-51 — Trace inject malformed parent_id rejection

Status quo (pre-resolution) - D-33 §"Optional parent_id Override on inject()" requires that a non-^[0-9a-f]{16}$ value raise INVALID_PARENT_ID. - Python+TypeScript raised; Rust silently truncated/padded the bad value, so a typo like "ZZZZ" produced a malformed but successfully-emitted traceparent header.

Resolution - Rust TraceContext::inject now validates the optional parent_id argument against ^[0-9a-f]{16}$ before emitting and returns Err(TraceError::InvalidParentId) (mapped to error code INVALID_PARENT_ID) on mismatch, matching Python+TypeScript.

Status: resolved. See docs/features/observability.md "W3C Alignment Rules" §"Optional parent_id Override on inject()".


D-52 — Rust pipeline ConfigurationError variant

Status quo (pre-resolution) - D-37 ("Pipeline configuration fail-fast") declared two distinct fail-fast surfaces: - ConfigurationError at YAML parse time when a key of the pipeline.configure map references an unknown step name. (Two corrections since: configure is an object map keyed by step name, not an array — schemas/apcore-config.schema.json $defs/PipelineConfig and all three parsers agree — and pipeline.step_middleware is not a configuration section at all; no SDK ever parsed it and the canonical schema does not declare it. See apcore#80.) - PipelineDependencyError at strategy construction time when a step's requires/provides declarations are unsatisfied. - Rust collapsed both into a single PipelineError::Dependency variant, so callers could not distinguish "you wrote a typo in YAML" from "your topology is unsatisfiable".

Resolution - Rust now ships a distinct PipelineError::Configuration variant mapped to error code PIPELINE_CONFIGURATION_ERROR, raised at YAML parse time for unknown step references. PipelineError::Dependency (code PIPELINE_DEPENDENCY_ERROR) is reserved for strategy-construction-time capability mismatches. - Correction (0.26 sweep). This entry originally said "Python+TypeScript already raised the two distinct codes". That was true of Python and false of TypeScript, which emitted PIPELINE_CONFIG_INVALID — a different code in the features/error-system.md registry, meaning a malformed field value rather than a missing step. Rust's variant also serialized to CONFIGURATION_ERROR, a string in no registry. So all three emitted different codes for the same event, and pipeline_failfast_config.json reported green throughout because it asserted the CLASS name ConfigurationError, which all three happen to share. Both SDKs corrected; the fixture now asserts the wire code. See apcore#81, apcore-typescript#34, apcore-rust#31.

Status: resolved. See docs/features/middleware-system.md "Pipeline Step Middleware (Issue #33)" → "Configuration safety" subsection.


D-53 — TS redaction Config key alignment

Status quo (pre-resolution) - D-46 canonicalized obs.redaction.regex_patterns and obs.redaction.sensitive_keys as the YAML config keys feeding RedactionConfig. - Python+Rust read the canonical keys. - TypeScript still read the older observability.redaction.field_patterns / observability.redaction.value_patterns keys (a hold-over from §1.5's pre-D-46 prose), so YAML written against the spec produced empty redaction rules in TS deployments.

Resolution - TypeScript RedactionConfig.fromConfig(config) now reads obs.redaction.regex_patterns, obs.redaction.sensitive_keys, and obs.redaction.replacement as the canonical source. The legacy keys (observability.redaction.field_patterns, observability.redaction.value_patterns) are still honored for one minor cycle and emit a console.warn deprecation notice when found. Removal target: v0.22.0.

Status: resolved. See docs/features/observability.md "Redaction configuration" → "TypeScript legacy keys" note.


D-54 — sensitive_keys canonical default list

Status quo (pre-resolution) - D-46 introduced obs.redaction.sensitive_keys and listed a 14-entry default in prose. SDKs shipped slightly different defaults: Python included the legacy _secret_* glob; TypeScript dropped apiKey (camelCase); Rust included apiKey but missed bearer. Conformance fixtures assumed a 14- or 15-entry list depending on the SDK under test.

Resolution - All 3 SDKs MUST ship a 16-entry canonical default obs.redaction.sensitive_keys value: ["_secret_*", "password", "passwd", "secret", "token", "api_key", "apikey", "apiKey", "access_key", "private_key", "authorization", "auth", "credential", "cookie", "session", "bearer"]. - The leading _secret_* preserves the legacy _secret_-prefix behavior under the canonical default; the redundant apiKey/apikey pair is intentional so cross-SDK fixtures byte-match. - Operators override by setting obs.redaction.sensitive_keys in apcore.yaml (override replaces the default; it does not merge).

Status: resolved. See docs/features/observability.md "Canonical default sensitive_keys" subsection. Conformance fixture: conformance/fixtures/sensitive_keys_default.json.


D-55 — UsageExporter push interface (#45 §3)

Status quo (pre-resolution) - §1.3 ("Prometheus Exporter for UsageCollector") in docs/features/system-modules.md covers the pull-style path: Prometheus scrapes /metrics. There was no canonical surface for the push-style path (HTTP POST, Kafka publish, ClickHouse insert) other than ad-hoc user middleware. - TypeScript shipped a private _pushUsageEvery helper used internally by tests; Python+Rust had no equivalent. There was no shared protocol/trait/interface, so users wishing to ship periodic summaries had to subclass an internal class or rebuild the timer loop.

Resolution - All 3 SDKs MUST ship a UsageExporter Protocol (Python) / interface (TypeScript) / trait (Rust) with two methods: export(summary) and shutdown(). - All 3 SDKs MUST ship NoopUsageExporter (default) and PeriodicUsageExporter (bundled timer wrapper, default interval_seconds: 3600). - Transport-bound exporters (HTTP, Kafka, etc.) are explicitly out-of-tree; users implement against their preferred client. - stop() MUST await exporter.shutdown(); in-flight export() calls MUST complete or be cancelled before shutdown() returns; stop() MUST be idempotent.

Status: resolved. See docs/features/observability.md "## UsageExporter (push-style)" section. Conformance fixture: conformance/fixtures/usage_exporter.json (3 cases).


D-56 — TS _discoverDefault 8-stage refactor (D-32 follow-through)

Status quo (pre-resolution) - D-32 picked Option A: refactor TypeScript _discoverDefault to expose _filterIdConflicts and _registerInOrder as separate stages so the discovery pipeline matches the 8-stage shape Rust+Python (and the spec's Algorithm A04) ship. - TypeScript still inlined conflict batching into _registerInOrder, surfacing as 6 helpers instead of 8 — cross-language conformance fixtures had to special-case TS.

Resolution - TypeScript SDK refactored: _filterIdConflicts is now a separate private helper invoked between candidate enumeration and registration. _registerInOrder is reduced to pure registration with no conflict logic. - Python+Rust unchanged (already 8-stage). - Algorithm A04 in docs/spec/algorithms.md describes one canonical 8-stage pipeline; cross-language conformance no longer special-cases TS.

Status: resolved. See docs/spec/algorithms.md Algorithm A04 (8-stage pipeline) and the existing conformance/fixtures/multi_module_discovery.json (no fixture change required — TS now follows the canonical shape).


D-57 — §4.6 reasoning / context / dry-run conventions

Status quo (pre-resolution) - The 2025–2026 LLM-agent / cognitive-architecture / tool-use frontier-research alignment audit identified three signals not covered by the 18 existing x-* conventions in §4.6: - Reasoning load for upstream model routers (RouteLLM ICLR 2025, xRouter arXiv 2510.08439, Cost-Aware Model Orchestration arXiv 2512.01099 all consume per-tool reasoning hints; apcore had nothing to expose). - Required state the module reads from context.data (orchestrators / apcore-mcp bridges currently have no standard way to pre-fetch and inject the right keys). - Module-level dry-run capability (existing per-step pure: bool metadata governs the pipeline, but no module-level signal told the caller whether Executor.validate() would yield useful information for this module). - A four-round audit (PROTOCOL_SPEC text + features docs + Module-interface contract + 3 SDK source reads) confirmed that the metadata layer is fully free-form: apcore-python metadata: dict[str, Any], apcore-typescript metadata: Record<string, unknown>, apcore-rust serde_json::Value. None of the SDKs hard-code an x-* allowlist; .claude/rules/protocol-spec.md further constrains the team from inventing new x-* keys outside §4.6.

Resolution - Register three new x-* keys in the §4.6 conventions table and add a corresponding "Routing & Verification Hints" YAML example block: - x-reasoning-demand — low | medium | high (Routing). - x-required-context-keys — array of strings naming context.data keys the module reads (Planning). Framework-owned Context fields (trace_id, caller_id, etc.) are explicitly not included. - x-supports-dry-run — boolean, module-level signal that Executor.validate() is meaningful (Verification). - No SDK behavior change. Framework continues to ignore unknown metadata content (§4.6 "Metadata Design Principles"); strict-mode export (§4.16) auto-strips all x-* keys including these. - No normative MUST / MUST NOT. Conventions only — consistent with the existing 18 x-* entries in §4.6.

Status: resolved. See protocol-spec.md §4.6 ("Routing & Verification Hints" YAML block + table rows) and CHANGELOG.md [Unreleased] block.

Cross-refs: - Stage 1 of the apcore frontier-alignment plan. - Literature: RouteLLM (ICLR 2025); xRouter (arXiv 2510.08439); Cost-Aware Model Orchestration (Smirnova, arXiv 2512.01099); Budget-Aware Tool-Use (arXiv 2511.17006); ToolMaker (ACL 2025, arXiv 2502.11705) — the standalone rfc-ephemeral-modules.md and rfc-preview-method.md were merged into protocol-spec.md and removed in the spec 1.60.0 docs rewrite.


Resolution status — iter-9 addendum (doc-only follow-through, 2026-05-05)

The original 2026-05-02 Resolution status block listed seven entries as "Doc-only fixes" (D-01, D-07, D-09, D-16, D-59, D-60, D-26) but five of them were never executed. A re-audit in iter-9 found:

  • D-09 and D-59 had been silently closed in earlier rounds (start()/stop() already removed from PROTOCOL_SPEC §12; caller_id_for_unknown configurability text already removed from acl-system.md) but the Resolution status block was not updated to reflect this.
  • D-01, D-07, D-16, D-60, D-26 had not been touched since the decision log was written 2 weeks earlier.

Status updates landed 2026-05-05:

  • D-01 — resolved. protocol-spec.md §5.7 changed enum: [user, service, agent, api_key, system] to examples: [user, service, agent, api_key, system, ai]; description clarifies the field is free-form. docs/features/identity-system.md admonition rewritten to reference the examples list rather than asserting "free-form" without context.
  • D-07 — resolved. docs/features/call-chain-guard.md:210 corrected from FrequencyExceededError(code=FREQUENCY_EXCEEDED) to CallFrequencyExceededError(code=CALL_FREQUENCY_EXCEEDED), matching the implementation + Error Types table at line 100 of the same file.
  • D-09 — resolved (verified). start() / stop() lifecycle mentions are absent from protocol-spec.md; the iter-9 audit confirmed the earlier removal.
  • D-16 — resolved. docs/features/streaming.md Rust producer example rewritten to use the actual trait signature fn stream(&self, ...) -> Option<ChunkStream>, returning a pinned async_stream::stream! block that yields Result<Value, ModuleError> chunks. The earlier example incorrectly showed async fn stream(...) -> Result<Vec<Value>, ModuleError> (buffered).
  • D-59 — resolved (verified). docs/features/acl-system.md no longer suggests configurability for caller_id_for_unknown; @external is treated as the canonical literal throughout the doc.
  • D-60 — resolved. docs/spec/algorithms.md Algorithm A09 (evaluate_acl) revised: dropped the priority: Integer field from the Rule struct; dropped the sort + deny-before-allow tiebreak steps; documented insertion-order-first-match-wins as the canonical evaluation order with rationale cross-referenced to this entry. Implementation Notes also updated.
  • D-26 — resolved. docs/features/identity-system.md gained a new "Equality and hashability" subsection: Identity is a value type with structural equality (id + type + roles + attrs); hashability is implementation-defined per language (Rust derives Hash; Python frozen dataclass with dict attrs is not hashable; TypeScript is caller's responsibility).

No SDK behavior changes, no normative MUST / MUST NOT additions, no schema files touched.


Resolution status — iter-12 addendum (RFC promotion to normative spec, 2026-05-06)

After all four SDK pilot PRs merged (apcore-rust#25, apcore-python#26, apcore-typescript#29, apcore-typescript#30), the Stage-2 (Module.preview()) and Stage-3 (ephemeral.* namespace + discoverable annotation) RFCs were promoted from Draft / RFC to Accepted (target v0.21.0). The normative content folded into protocol-spec.md:

  • §2.5 Reserved Words — ephemeral appended to the framework reserved list. New "Reserved namespace semantics" table immediately below the YAML block enumerates the registration / discoverability / mandatory-annotation contract for system.*, internal.*, core.*, apcore.*, plugin.*, schema.*, acl.*, and ephemeral.*. The register_internal() MUST-reject rule for ephemeral.* is now normative.
  • §4.4 ModuleAnnotations — new discoverable: boolean field (default true) inserted between requires_approval and open_world. AI-usage decision examples block updated to include discoverable=false → AI / orchestrator hides the module from enumeration surfaces.
  • §5.6 Module Interface Protocol — optional preview(inputs, context) -> PreviewResult | null method added to both the language-agnostic pseudocode interface block and the YAML optional_methods block. Cross-references §12.8 for the schema. Preflight-style exception semantics documented (advisory warning, no-fail).
  • §12.8 Executor.validate() type contracts — new Change and PreviewResult type definitions added. PreflightResult extended with predicted_changes: List<Change> field. PreflightCheckResult.check enum extended with module_preview.

Both RFC documents (docs/spec/rfc-preview-method.md, docs/spec/rfc-ephemeral-modules.md) updated their Status header from Draft / RFC to Accepted with target version v0.21.0 and explicit cross-references to the normative protocol-spec.md sections. The RFCs are retained as design rationale + cross-SDK schema-encoding reference (pydantic / serde-flatten / TypeBox Type.Unsafe) — implementations should consult protocol-spec.md for the canonical contract.

CHANGELOG.md v0.21.0 block records the version bump. (Both RFC files were later removed; their normative content lives in protocol-spec.md §2.5, §4.4, §5.6 and §12.8.)

SDK rollout status (cross-repo follow-up tracked separately): - apcore-python: ships full Stage 2 + Stage 3 surface (PR #26, post iter-11). - apcore-typescript: ships Stage 2 Module.preview() (PR #29). Ephemeral / discoverable implementation pending — same kind of pilot work as apcore-python#26. - apcore-rust: ships Stage 2 #[non_exhaustive] prerequisite (PR #25). Module.preview() SDK-side implementation + ephemeral / discoverable pending.

Conformance-fixture update deferred per rfc-ephemeral-modules.md "Transitional fixture handling": conformance/fixtures/annotations_extra_round_trip.json will be updated only after all 3 SDKs ship discoverable. Until then, the SDKs that have shipped support (currently apcore-python) make their conformance test runner pilot-tolerant.


Resolution status — iter-11 addendum (RFC clarifications post pilot-implementation, 2026-05-05)

A round of parallel sub-agent SDK pilot implementations against the two Stage-2/Stage-3 RFCs (rfc-preview-method.md, rfc-ephemeral-modules.md) surfaced concrete ambiguities and one factual error in the RFC text. Resolutions landed as same-day RFC edits on main. Pilot PRs:

  • apcore-rust#25 — #[non_exhaustive] hygiene for spec-derived public structs (Stage 2 prereq)
  • apcore-python#26 — ephemeral.* namespace + discoverable annotation pilot (Stage 3)
  • apcore-typescript#29 — Module.preview() implementation (Stage 2)
  • apcore-typescript#28 → PR #30 — multiClassEnabled arg drop (D-06 follow-through)

Clarification 1 — rfc-preview-method.md Pre-conditions: #[non_exhaustive] migration pattern

Surfaced by: apcore-rust#25 agent during implementation.

Issue: The RFC's earlier text claimed downstream consumers should use ..Default::default() (functional record update / FRU) syntax to construct extended structs. This is factually wrong. Per Rust's [E0639], #[non_exhaustive] blocks struct-literal construction from outside the defining crate entirely, including FRU. The ..Default::default() pattern works only within the defining crate.

Resolution: RFC Pre-conditions section rewritten with the correct migration pattern (Default::default() + field assignment) and a cross-SDK forward-compat-semantics table showing why this is a Rust-only concern. The apcore-rust v0.21.0 CHANGELOG (PR #25) is the canonical reference for the migration code example.

Clarification 2 — rfc-ephemeral-modules.md: single-emit audit rule

Surfaced by: apcore-python#26 agent.

Issue: All three SDKs have a pre-existing registry-event bridge (_bridge_registry_events in Python; equivalents in TypeScript and Rust) that emits apcore.registry.module_registered / module_unregistered with empty payload. Naively adding a second contextual emit for ephemeral.* produced dual-emit of the same event_type for the same registration.

Resolution: RFC §"Audit-event single-emit rule" added. For ephemeral.* registrations, exactly one event MUST be emitted, carrying the contextual payload (module_id, caller_id defaulting to "@external", redacted identity snapshot, namespace_class: ephemeral). For non-ephemeral.* registrations, the existing bridge's empty-payload behavior is preserved. Implementation detail (short-circuit bridge vs. extend bridge) is per-SDK.

Clarification 3 — rfc-ephemeral-modules.md: register_internal() rejection

Surfaced by: apcore-python#26 agent.

Issue: Python's register_internal() historically reserved for system.* modules. The RFC didn't explicitly state whether ephemeral.* IDs could be registered via this backdoor.

Resolution: RFC §"register_internal() interaction" added. register_internal() (or equivalent) MUST reject ephemeral.* IDs and direct callers to Registry.register(). Rationale: namespace → registration-mechanism is a 1:1 mapping; mixing blurs the audit-trail distinction between framework-emitted (system.*) and caller-emitted (ephemeral.*) events.

Clarification 4 — rfc-preview-method.md: Change.x-* schema encoding

Surfaced by: apcore-typescript#29 agent during TypeBox schema definition.

Issue: TypeBox 0.34 doesn't natively express the TypeScript template-literal index signature [key: \x-${string}`]: unknownforChange. NaiveType.Object()rejectsx-*keys;Type.Intersect([Object, Record])losesadditionalProperties: false` precision.

Resolution: RFC §"Change.x-* extension fields — cross-SDK schema-encoding note" added. The spec does NOT prescribe a runtime-validation mechanism; per-SDK guidance: - Python: pydantic extra='allow' + ^x- validator - Rust: #[serde(flatten)] extra: HashMap + custom validator - TypeScript: Type.Unsafe<Change>(...) injecting raw JSON Schema patternProperties: { "^x-": {} } (escape-hatch; preserves TS type)

apcore-typescript PR #29 author noted this in JSDoc; follow-up to upgrade the TypeBox schema to Type.Unsafe is straightforward.

Clarification 5 — rfc-ephemeral-modules.md: transitional conformance-fixture handling

Surfaced by: apcore-python#26 agent (made conformance test pilot-tolerant for missing discoverable).

Issue: Updating conformance/fixtures/annotations_extra_round_trip.json to require the new discoverable field would actively break the conformance tests of SDKs that haven't shipped support yet (TypeScript and Rust during the rollout window).

Resolution: RFC §"Transitional fixture handling during multi-SDK rollout" added. SDKs implementing discoverable MAY make their conformance test runner pilot-tolerant (strip the field from comparison when expected_serialized lacks it). Once all three SDKs ship support, a synchronized follow-up PR updates the fixture and removes pilot-tolerant code paths.


Resolution status — iter-10 addendum (D-06 doc-side, 2026-05-05)

  • D-06 (doc-side) — resolved. docs/features/multi-module-discovery.md "Enabling Multi-Class Mode" section rewritten to drop the Global opt-in (configuration) paragraph that referenced the unimplemented extensions.multi_class_discovery config key. Per-class markers (@multi_class / @multiClass() / #[multi_class]) are now documented as the only opt-in path, with an inline backward-reference note pointing readers to this decision-log entry.

The TS-side follow-through (apcore-typescript Registry.discoverMultiClass dropping the multiClassEnabled argument) was still open at this point; it was finally settled by D-107 (spec v1.50.0). protocol-spec.md did not reference the global toggle and required no edit.

Direct commit to main (no PR) per maintainer authorization; doc-only, no SDK behavior change, no normative spec change.


D-64 — acl.root dead key: activate config-driven ACL discovery + unify default

Outcome: implemented as Option A in release 0.25.0. ACL.discover(config) exists in all three SDKs and is wired by the APCore bootstrap; a missing acl.root path attaches no ACL; acl.root defaults to ./acl everywhere. The base a relative acl.root resolves against is recorded in protocol-spec §9.2.2.

Tracking issue: #74. Related: #75 (include: config composition — separate, ACL-independent).

Status quo

acl.root is registered (and in Rust hard-required) in every SDK's Config, and acl.default_effect is validated, but no code consumes acl.root to load an ACL. ACL enforcement only exists when application code manually calls ACL.load(path) + executor.set_acl(acl). The config key is decorative. The default also diverges across SDKs.

Capability Python TypeScript Rust
acl.root registered as known/required key ✅ config.py:44 ✅ config.ts:37 ✅ config.rs:481
acl.default_effect validated (allow|deny) ✅ config.py:51-53 ✅ config.ts:67 ✅ config.rs:588-596
Default value for acl.root './acl' (config.py:133-136) './acl' (config-defaults.ts:38-41) none — hard-required; omission ⇒ CONFIG_INVALID (config.rs:1865)
Consumer reads acl.root to load ACL ❌ none ❌ none ❌ none
Inline acl.rules in apcore.yaml ❌ ❌ ❌
ACL auto-discovery (discover) ❌ ❌ ❌

Two problems: (1) acl.root is a dead key — the "point config at an ACL dir" workflow does not exist; (2) the same apcore.yaml omitting acl.root passes in Py/TS (default ./acl) but fails validation in Rust.

Options

  • A Activate acl.root via ACL.discover(config) that attaches an ACL only when the resolved acl.root path exists (missing = no ACL attached, preserving today's no-enforcement default); unify the default to './acl' in all 3 SDKs (Rust gains the default, drops hard-required).
  • B Activate discovery but make acl.root truly required everywhere (Py/TS drop the default). Breaking for existing Py/TS configs that omit the key.
  • C Drop acl.root from the spec entirely; document ACL.load(path) + set_acl() as the only path. Removes the dead key but abandons the original config-driven design intent.

Recommendation: A.

Rationale: - Config-driven discovery is the documented design intent; activating it across all 3 SDKs is the consistent fix. Doing it in one SDK only would manufacture a new cross-language divergence. - Critical non-breaking invariant: a missing acl.root path MUST attach no ACL — NOT an empty default_effect: deny ACL. Attaching default-deny when no file exists would deny every inter-module call in every project that has no ACL today (a silent, severe breaking change). default_effect: deny only takes effect once an ACL file is actually present. - Unifying on './acl' (Option B's "required everywhere" is breaking for Py/TS) keeps existing configs working and removes Rust's outlier hard-require. - Inline acl.rules stays unsupported by design; complex ACL structure belongs in its own file via ACL.load(path).

Action

  • Add ACL.discover(config) to Python / TypeScript / Rust: resolve acl.root relative to the config file; if the path exists, ACL.load() it and wire executor.set_acl(acl); if absent, attach nothing.
  • Unify acl.root default to './acl' in all 3 SDKs; Rust no longer rejects a config that omits acl.root.
  • Conformance fixture covering: present-dir loads + enforces, missing-dir no-op (no enforcement), unified default value.
  • Update demo + acl-system.md to show the config-driven path (acl.root: ./acl in apcore.yaml).
  • Cross-SDK rollout: spec and fixture in apcore first, then three parallel SDK changes.

D-65 — include: cross-file configuration composition

Outcome: still open. The RFC remains Proposed; no SDK implements include: and the canonical config schema does not declare it.

Tracking issue: #75. Full design: RFC — include: Configuration Composition. Independent of D-64 (#74).

Status quo

apcore.yaml is a single monolithic file. There is no in-SDK way to split shared configuration (ACL, observability, pipeline, per-environment overrides) into reusable fragments — teams must duplicate YAML or assemble it with an external pre-processing step before apcore loads it.

Decision needed

Whether to add a top-level include: key for declarative cross-file composition, and on exactly what merge/resolution semantics — these must be identical across Python, TypeScript, and Rust before any code lands.

Recommendation: adopt the RFC as drafted (Proposed), pending maintainer ratification. Key semantics:

  • include: is a list of file-path strings, resolved relative to the declaring file's directory.
  • Expansion is a pre-processing phase (before validation / env-overrides / binding) producing one merged mapping.
  • Precedence A < B < local: includes in listed order, then the declaring file's own keys win. Deep-merge mappings; replace scalars and lists (no element-level list merge — YAGNI).
  • Recursive includes allowed; cycle detection raises a new CONFIG_INCLUDE_CYCLE; missing file → CONFIG_NOT_FOUND; non-list include → CONFIG_INVALID.
  • Out of scope (YAGNI): globs, remote URLs, conditional includes, list-element merging, reserved-namespace/version scaffolding on the include block.

Rationale: - Config-driven composition is a recurring real need; doing it in-SDK with one ratified contract avoids each SDK (and each team's external tooling) inventing divergent merge rules. - Local-wins precedence matches developer intuition ("include bases, then tweak locally"; cf. CSS @import, shell source-then-override). - The YAGNI exclusions keep the v1 surface small and the cross-language algorithm trivially portable (see the RFC's three-SDK sketch).

Open questions (carried in the RFC): fragment-relative path values vs. root-relative (v1 = root-relative; since settled by spec v1.35.0 §9.2.2, which gives a Config one resolution base); CONFIG_INCLUDE_CYCLE registration against the canonical error-code prefix set; whether a max-depth policy limit is needed beyond cycle detection (v1 = no).

Action

  • Ratify the RFC (maintainer review). On acceptance: register CONFIG_INCLUDE_CYCLE; add conformance/fixtures/config_include.json per the RFC's conformance plan; implement the expansion phase in all 3 SDKs; document include: in DECLARATIVE_CONFIG_SPEC.md.