arch(level1-merged): integrate ws-1 + ws-2 + ws-3 + ws-3.5 - #3554
henrypark133 wants to merge 38 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the strategy trait contracts for the agent-loop framework, defining traits and associated types for batch policy, budget, capability filtering, context planning, input draining, gate handling, recovery, and stop conditions. The review feedback highlights a naming contradiction in the UnlimitedBudget implementation, a misplaced test in drain.rs, and an inconsistency in the serialization tagging of the StopOutcome enum relative to other strategy outcomes.
8c3b67b to
3359dfb
Compare
…, NoProgressDetected (iter 4, approved)
… on rebase)
- Split ControlStrategyState into StopStrategyState + GateStrategyState
(slots.rs); LoopExecutionState now carries both as independent slots.
- Add LoopFailureKind::PolicyDenied with snake_case serde + #[non_exhaustive]
on the enum; downstream matchers in reborn updated to handle the
non-exhaustive shape with a fail-closed wildcard.
- JCS RFC 8785 canonicalization for CapabilityCallSignature::from_call via
the serde_jcs crate; from_call is now fallible (returns Result) and
rejects non-finite numbers (NaN/Infinity) via an explicit guard.
- LoopExecutionState::from_checkpoint_payload signature flipped from
&serde_json::Value to (&[u8], kind: CheckpointKind); envelope carries
schema_id + kind metadata so the boundary the checkpoint was taken at is
authenticated on resume.
- LoopContextMessage.message_ref is now Option<LoopMessageRef>; None means
"summary-only entry; prompt port MUST NOT resolve content from
safe_summary." Call sites in loop_support, reborn, and tests updated to
wrap in Some(...) on writes and filter_map on reads.
- LoopCheckpointPort: removed the premature load_checkpoint_payload stub
(WS-10 owns it); added stage_checkpoint_payload(
StageCheckpointPayloadRequest { schema_id, payload }
) -> LoopCheckpointStateRef with a fail-closed default impl.
- ConcurrencyHint { SafeForParallel, Exclusive } added to
ironclaw_turns::run_profile::host; CapabilityDescriptorView gains a
concurrency_hint field. All struct-literal constructors updated
(defaulting to Exclusive until WS-9 derives from CapabilityDescriptor.effects).
- Tests: JCS-stable across pretty/minified, nested-shuffled, key-reordering;
grep-style assertion that LoopExecutionState has no control_state;
StopStrategyState / GateStrategyState default round-trip; PolicyDenied
serializes as "policy_denied"; checkpoint kind-mismatch path.
- Cargo.toml: add serde_jcs + blake3 deps; drop siphasher (the hand-rolled
canonicalization is replaced wholesale).
Rebased onto docs HEAD 93f0865 to incorporate:
ebd2dc9 ca648b3 49d1506 2b20998 4c12192 1f808fa e48a584 93f0865
…xes) Address two P2 findings from codex review: - StageCheckpointPayloadRequest now carries LoopCheckpointKind so adapters can bridge to CheckpointStateStore::put_checkpoint_state without guessing. - HostManagedLoopCheckpointPort and RebornLoopDriverHost both implement stage_checkpoint_payload; the trait's default Unavailable body remains as defense-in-depth.
…text (codex iter 2 fixes)
Three findings from codex review:
- from_checkpoint_payload now reads raw state bytes (matches the
staging contract); metadata stays out of the payload.
- stage_checkpoint_payload returns a run-scoped LoopCheckpointStateRef
(checkpoint:{run_id}:{token}); is_for_run validators no longer reject.
- HostManagedLoopPromptPort materializes summary-only LoopContextMessage
entries from safe_summary instead of dropping them via filter_map.
# Conflicts: # crates/ironclaw_agent_loop/src/strategies/mod.rs
# Conflicts: # crates/ironclaw_agent_loop/src/strategies/mod.rs
3359dfb to
22a8e1d
Compare
SummaryReviewed Level1 integration PR #3554 only. Merge stance: no unique Level1 integration finding beyond WS3.5 issues already posted on #3643. Tests run:
Findings
Security/data-flow notes
Correctness/invariant notes
Missing tests
Suggested fixes
|
Review notes — Level1 integrationMechanical join is clean; nothing to propagate back into WS1/WS2/WS3 individually. One ask before promoting out of draft. Validation bar is too lowThe PR checklist runs One cross-trait state-composition smoke testEvery test here is unit-level: object-safety + serde round-trip per strategy file. There is no test that simultaneously drives multiple strategies through a shared Minor
|
# Conflicts: # crates/ironclaw_agent_loop/src/strategies/capability.rs # crates/ironclaw_agent_loop/src/strategies/context.rs # crates/ironclaw_agent_loop/src/strategies/mod.rs # crates/ironclaw_agent_loop/src/strategies/model.rs
# Conflicts: # crates/ironclaw_agent_loop/src/strategies/batch.rs # crates/ironclaw_agent_loop/src/strategies/gate.rs # crates/ironclaw_agent_loop/src/strategies/mod.rs # crates/ironclaw_agent_loop/src/strategies/recovery.rs
# Conflicts: # crates/ironclaw_agent_loop/src/strategies/budget.rs # crates/ironclaw_agent_loop/src/strategies/drain.rs # crates/ironclaw_agent_loop/src/strategies/mod.rs # crates/ironclaw_agent_loop/src/strategies/stop.rs
# Conflicts: # crates/ironclaw_agent_loop/src/families/mod.rs # crates/ironclaw_agent_loop/src/family.rs # crates/ironclaw_reborn/src/app_loop_family.rs
|
Addressed the Level1 integration feedback in What changed:
Local validation passed:
GitHub checks are running on the new head. |
|
Closing pull request. the changes are already merged in. |
Context
Integration branch for the first parallel layer above WS0. It combines alpha/beta/gamma strategy traits and the loop-family registry so downstream planner/default-strategy work has one coherent base.
Master spec:
docs/reborn/agent-loop-skeleton.mdWorkstream brief:
docs/reborn/agent-loop-skeleton.mdStack base:
arch/ws-0Latest stack maintenance on 2026-05-14:
origin/reborn-integrationthrough WS17 before publishing the PR descriptions.What landed
arch/ws-1,arch/ws-2,arch/ws-3, andarch/ws-3.5on top of the current WS0.Reviewer focus
Non-goals / deferred work
Validation
cargo check -p ironclaw_agent_loop -p ironclaw_rebornarch/ws-0 -> arch/level1-merged.Stack position