Phase A: harness/web pre-work foundation - #100
Conversation
…dize worker layout
- inbox::* -> session-inbox::* - hooks::publish_collect -> hook-fanout::publish_collect Updates README, registry/index.json, turn-orchestrator callsites, and whitelists per-worker config.yaml files in .gitignore.
…nd description - Introduced constants for skill ID, metadata, and sub-skills in `lib.rs`. - Updated the description in `start.rs` to remove an unnecessary argument. - Implemented skill registration with retry logic and graceful shutdown handling in `main.rs`.
Replace Duration::from_secs(180)/(60) and from_secs(3 * 60) with from_mins(3)/from_mins(1) in skill-register retry loops for auth-credentials, llm-budget, and session-tree.
- Changed trigger type from "subscribe" to "durable:subscriber" in multiple modules. - Updated function IDs to use the "iii::durable::publish" format for consistency across the codebase.
Phase A item #3. Includes new test expected_workers_includes_approval_gate and the existing drift test passes.
…mirror on parent-read failure
|
Important Review skippedToo many files! This PR contains 174 files, which is 24 over the limit of 150. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (15)
📒 Files selected for processing (174)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # .gitignore
CI runs Rust 1.95 with stricter lints. Replace .map(...).unwrap_or(0) with .map_or(0, ...) in both harness/tests/common/mod.rs and turn-orchestrator/tests/common/mod.rs nonce() helpers.
Resolves squash-merge fake conflicts: Phase A/B content (PR #100, #102) landed on main as squash commits while feat/iii-native-harness retained the original commits + the tool->function rename + iii-native-harness work. Resolutions favor feat side for files where Phase A/B content was the sole source of conflict; main's unique content (skills filesystem support, storage worker, etc.) merged automatically. Removed turn-orchestrator/src/states/tools.rs (renamed to functions.rs).
Summary
Multi-crate foundation that unblocks the harness/web Phase B refactor (
#TBD). Adds bus surfaces, dual-write semantics, and a UI message reader/reducer that survive WS interleave.What's in the box
session-tree— exposed surfacesession-tree::list {limit?, offset?, order?: "asc"|"desc"}→{sessions, total}with pagination + ordering. Defaultdescbyupdated_at. Backed by existingSessionStore::list().session-tree::messagesresponse now[{entry_id, message}](wasAgentMessage[]). Breaking — only session-tree's own tests called it before.session-tree::ensure {session_id}— caller-supplied idempotent create.session-tree::reconcile {session_id, state_snapshot}→{state_count, tree_count_before, tree_count_after, repaired}for repairing state↔tree drift on demand.turn-orchestrator— dual-writepersistence.rs::save_messageswrites tostate::*(canonical) + best-effortsession-tree::appendfor the delta. Lazysession-tree::ensureon first append; failures logwarnand continue (never abort the turn).last_session_tree_len_keytracks how many messages have been mirrored, so re-saves don't re-append.harnessapproval-gateadded toEXPECTED_WORKERS+iii.worker.yamlsoapproval_requiredfrom the UI actually blocks. Drift test enforces alignment.harness/webloadMessagesWithEntryIds(sessionId)— UI helper that preferssession-tree::messagesand falls back tostate::geton empty/error. Drift case (no entry_ids) returnsentry_id: nullso callers can disable fork buttons with a tooltip.reducer.tsrewritten: entry-id-keyedMap, idempotent under any arrival order, patch-merge for streaming deltas,lastEntryIdcheckpoint for replay-after-reconnect, unknown event types ignored (forward-compat). Old per-message ad-hoc dedupe removed.visibleMessages(state)consumer helper composes the keyed + unkeyed view.iii-browser-sdk (separate repo)
Companion PR:
iii-hq/iii#1611— addsaddConnectionStateListeneronISdkso consumers can observe WS connection state. Already merged + published asiii-browser-sdk@0.11.7-next.1. Phase B consumes it.Test plan
cargo test --libclean acrossharness(4),session-tree(42),turn-orchestrator(63)cargo test --testsclean — incl. newharness/tests/phase_a.rsE2E (dual-write → fork → simulated drift → reconcile)cargo clippy --lib --tests -- -D warningsclean across all changed cratesharness/webvitest: 13 passing (reducer + loadMessages)tsc --noEmitcleannpm run buildcleandemo.shstack (16 workers including approval-gate)Risks & deferred items
?/unwrapon session-tree calls inmirror_messages_to_session_tree) is enforced by code review.tests/common/mod.rswalks../session-tree/target/...with env override. Acceptable as v1; follow-up could usecargo metadata.Commit history
12 atomic commits, TDD throughout. Each commit is independently buildable + testable.