Skip to content

Split cognition/act_observe/mod.rs by responsibility - #5240

Open
joelteply wants to merge 7 commits into
canaryfrom
fable/split-act-observe
Open

joelteply wants to merge 7 commits into
canaryfrom
fable/split-act-observe

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

mod.rs (2,509 lines) was a 49-line coordinator plus an inline test module. Tests moved verbatim to act_observe/tests/{mod(fixtures),chain,apply,drive,credit,investigation}.rs (410/125/440/534/509/507 lines); mod.rs is now 49 lines. Two relative paths gained a super:: (settle::NARRATION_BUDGET, perception::batch_evidence). Uncompiled locally; CI is the compile check. source-hygiene suite: 42 passed, all ratchets at baseline (file-size ratchet unchanged, it does not count this test code).

🤖 Generated with Claude Code

@joelteply

Copy link
Copy Markdown
Contributor Author

PASS #5240 at 13e77d7, Cormac. Claim checked: a pure move, by the same multiset diff against the base branch. Unmatched lines are only:

  • the split test files' per-file imports (the merged use ...::{...} blocks became single uses);
  • six #![cfg(test)] headers and the mod apply/chain/credit/drive/investigation; mod tests; wiring;
  • two paths one level deeper (super::super::settle::NARRATION_BUDGET, super::super::perception::batch_evidence);
  • the fixtures doc and the baseline.

Base automatically changed from fable/split-every-oversized-file to canary October 21, 2026 07:13
joelteply and others added 4 commits October 21, 2026 02:14
mod.rs was a 49-line coordinator plus a 2,460-line inline test module. The test
module moves to act_observe/tests/ (declared `#[cfg(test)] mod tests;`):

- tests/mod.rs           shared fixtures: RecordingExecutor, FailingExecutor,
                         ScriptedExecutor, ActThenSpeak, AlwaysAct, CountingSpeaker,
                         body/body_with_wm/admission/acts_of helpers (410 lines)
- tests/chain.rs         causal ActChain linking scenarios (125)
- tests/apply.rs         apply_act scoping, folded/running alias, no-hands/failure (440)
- tests/drive.rs         drive_to_settle / settle_step scenarios + nudge rearm (534)
- tests/credit.rs        directed credit and live room input scenarios (509)
- tests/investigation.rs multi-act investigation, re-awaken, promise/echo gates (507)

Test bodies are moved verbatim (dedented); two relative paths gain one `super::`
(settle::NARRATION_BUDGET, perception::batch_evidence). Uncompiled locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
(cherry picked from commit 946a8c0)
…ad them as test code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
(cherry picked from commit 13a29ca)
…split

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
(cherry picked from commit 05823ff)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
(cherry picked from commit 13e77d7)
@joelteply
joelteply force-pushed the fable/split-act-observe branch from 13e77d7 to de3d204 Compare October 21, 2026 07:14
joelteply and others added 3 commits October 21, 2026 03:08
…erve

# Conflicts:
#	core/source-hygiene/src/file_size.rs
…e merge commit left a 0 placeholder)

Fresh per-worktree build, cargo test -p source-hygiene 43/43 at this value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…erve

# Conflicts:
#	core/source-hygiene/src/file_size.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant