Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions scripts/core-boundaries/rules/source/forbidden-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1665,22 +1665,27 @@ export const forbiddenContentRules = [
],
},
{
path: 'src/crates/assembly/core/src/agentic/session/file_read_state.rs',
path: 'src/crates/assembly/core/src/agentic/session/review_read_receipt.rs',
patterns: [
{
regex: /\bpub struct FileReadState\b/,
regex: /\bpub struct FileRevision\b/,
message:
'core file_read_state must not own file-read state DTOs; use openbitfun-agent-runtime file_read_state',
'core review_read_receipt must not own file revision DTOs; use openbitfun-agent-runtime review_read_receipt',
},
{
regex: /\bpub struct FileReadStateStore\b/,
regex: /\bpub struct ReviewReadCoverage\b/,
message:
'core file_read_state must not own in-memory file-read state store; use openbitfun-agent-runtime file_read_state',
'core review_read_receipt must not own review coverage DTOs; use openbitfun-agent-runtime review_read_receipt',
},
{
regex: /\bpub struct ReviewReadReceiptStore\b/,
message:
'core review_read_receipt must not own the receipt store; use openbitfun-agent-runtime review_read_receipt',
},
{
regex: /\bDashMap\b/,
message:
'core file_read_state must not own file-read state storage maps; use openbitfun-agent-runtime file_read_state',
'core review_read_receipt must not own receipt storage maps; use openbitfun-agent-runtime review_read_receipt',
},
],
},
Expand Down Expand Up @@ -2715,12 +2720,12 @@ export const forbiddenContentRules = [
],
},
{
path: 'src/crates/assembly/core/src/agentic/tools/file_read_state_runtime.rs',
path: 'src/crates/assembly/core/src/agentic/tools/review_read_receipt_runtime.rs',
patterns: [
{
regex: /framework::(?:\{[^}]*\bToolUseContext\b[^}]*\}|\bToolUseContext\b)/,
message:
'file read-state runtime must import ToolUseContext from tool_context_runtime, not the framework re-export',
'review read receipt runtime must import ToolUseContext from tool_context_runtime, not the framework re-export',
},
],
},
Expand Down Expand Up @@ -3047,16 +3052,6 @@ export const forbiddenContentRules = [
},
],
},
{
path: 'src/crates/assembly/core/src/agentic/tools/file_read_state_runtime.rs',
patterns: [
{
regex: /\bnormalize_string\b/,
message:
'core file read-state runtime must delegate pure freshness normalization to openbitfun-agent-tools',
},
],
},
{
path: 'src/crates/assembly/core/src/agentic/tools/tool_result_storage.rs',
patterns: [
Expand Down
2 changes: 1 addition & 1 deletion scripts/core-boundaries/rules/source/public-api-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const agentRuntimeRootPublicModules = [
'event_source',
'events',
'evidence_ledger',
'file_read_state',
'review_read_receipt',
'native_hooks',
'output_surface',
'permission',
Expand Down
59 changes: 20 additions & 39 deletions scripts/core-boundaries/rules/source/required-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -975,29 +975,29 @@ export const requiredContentRules = [
],
},
{
path: 'src/crates/execution/agent-runtime/src/file_read_state.rs',
path: 'src/crates/execution/agent-runtime/src/review_read_receipt.rs',
reason:
'agent-runtime must own provider-neutral file-read state facts and session-scoped in-memory store',
'agent-runtime must own provider-neutral code-review read receipts and their session-scoped in-memory store',
patterns: [
{
regex: /\bpub struct FileReadState\b/,
message: 'missing agent-runtime file-read state DTO',
regex: /\bpub struct FileRevision\b/,
message: 'missing agent-runtime file revision DTO',
},
{
regex: /\bpub fn is_full_file_read\b/,
message: 'missing agent-runtime file-read completeness policy',
regex: /\bpub struct ReviewReadCoverage\b/,
message: 'missing agent-runtime review read coverage DTO',
},
{
regex: /\bpub struct FileReadStateStore\b/,
message: 'missing agent-runtime file-read state store',
regex: /\bpub struct ReviewReadReceiptStore\b/,
message: 'missing agent-runtime review read receipt store',
},
{
regex: /\bfile_read_state_accepts_nonempty_whole_file\b/,
message: 'missing agent-runtime file-read completeness regression',
regex: /\breview_read_receipt_store_scopes_entries_by_session\b/,
message: 'missing review read receipt session scoping regression',
},
{
regex: /\bfile_read_state_store_scopes_entries_by_session\b/,
message: 'missing agent-runtime file-read state session scoping regression',
regex: /\breview_read_receipt_covers_only_previously_returned_lines\b/,
message: 'missing review read receipt coverage regression',
},
],
},
Expand Down Expand Up @@ -2853,14 +2853,17 @@ export const requiredContentRules = [
],
},
{
path: 'src/crates/assembly/core/src/agentic/session/file_read_state.rs',
path: 'src/crates/assembly/core/src/agentic/session/review_read_receipt.rs',
reason:
'core file_read_state path must stay a compatibility facade over agent-runtime',
'core review_read_receipt path must stay a compatibility facade over agent-runtime',
patterns: [
{
regex:
/pub use openbitfun_agent_runtime::file_read_state::\{FileReadState, FileReadStateStore\};/,
message: 'missing agent-runtime file-read state compatibility re-export',
regex: /openbitfun_agent_runtime::review_read_receipt::\{/,
message: 'missing agent-runtime review read receipt compatibility re-export',
},
{
regex: /\bReviewReadReceiptStore\b/,
message: 'missing review read receipt store compatibility re-export',
},
],
},
Expand Down Expand Up @@ -5629,28 +5632,6 @@ export const requiredContentRules = [
},
],
},
{
path: 'src/crates/execution/tool-contracts/src/file_read_freshness.rs',
reason: 'agent-tools owns pure file-read freshness policy for Read/Edit/Write guardrails',
patterns: [
{
regex: /\bpub struct FileReadFreshnessFacts\b/,
message: 'missing file-read freshness facts contract',
},
{
regex: /\bpub fn normalize_tool_file_content\b/,
message: 'missing provider-neutral file content normalization helper',
},
{
regex: /\bpub fn file_read_facts_content_matches\b/,
message: 'missing file-read content equivalence helper',
},
{
regex: /\bpub fn file_read_facts_are_fresh\b/,
message: 'missing file-read freshness policy helper',
},
],
},
{
path: 'src/crates/execution/tool-contracts/src/tool_result_storage.rs',
reason:
Expand Down
36 changes: 16 additions & 20 deletions scripts/core-boundaries/self-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2368,12 +2368,17 @@ export function runManifestParserSelfTest({
) {
throw new Error('agentic system boundary rule must forbid terminal provider construction');
}
const coreFileReadStateRuleText = forbiddenRuleTextForPath(
'src/crates/assembly/core/src/agentic/session/file_read_state.rs',
const coreReviewReadReceiptRuleText = forbiddenRuleTextForPath(
'src/crates/assembly/core/src/agentic/session/review_read_receipt.rs',
);
for (const contract of ['FileReadState', 'FileReadStateStore', 'DashMap']) {
if (!coreFileReadStateRuleText.includes(contract)) {
throw new Error(`core file_read_state boundary rule must forbid ${contract}`);
for (const contract of [
'FileRevision',
'ReviewReadCoverage',
'ReviewReadReceiptStore',
'DashMap',
]) {
if (!coreReviewReadReceiptRuleText.includes(contract)) {
throw new Error(`core review_read_receipt boundary rule must forbid ${contract}`);
}
}
const coreEvidenceLedgerRuleText = forbiddenRuleTextForPath(
Expand Down Expand Up @@ -3180,13 +3185,13 @@ export function runManifestParserSelfTest({
],
},
{
path: 'src/crates/execution/agent-runtime/src/file_read_state.rs',
path: 'src/crates/execution/agent-runtime/src/review_read_receipt.rs',
contracts: [
'FileReadState',
'is_full_file_read',
'FileReadStateStore',
'file_read_state_accepts_nonempty_whole_file',
'file_read_state_store_scopes_entries_by_session',
'FileRevision',
'ReviewReadCoverage',
'ReviewReadReceiptStore',
'review_read_receipt_store_scopes_entries_by_session',
'review_read_receipt_covers_only_previously_returned_lines',
],
},
{
Expand Down Expand Up @@ -3643,15 +3648,6 @@ export function runManifestParserSelfTest({
'is_file_tool_guidance_message',
],
},
{
path: 'src/crates/execution/tool-contracts/src/file_read_freshness.rs',
contracts: [
'FileReadFreshnessFacts',
'normalize_tool_file_content',
'file_read_facts_content_matches',
'file_read_facts_are_fresh',
],
},
{
path: 'src/crates/execution/tool-contracts/src/tool_result_storage.rs',
contracts: [
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions src/crates/assembly/core/src/agentic/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ pub mod compression;
pub mod context_store;
mod context_usage;
pub mod evidence_ledger;
pub mod file_read_state;
pub mod prompt_cache;
pub(crate) mod revert;
pub mod review_read_receipt;
pub mod session_manager;
pub mod session_store_port;
pub mod token_anchor;
Expand All @@ -19,8 +19,8 @@ pub use compression::*;
pub use context_store::*;
pub use context_usage::*;
pub use evidence_ledger::*;
pub use file_read_state::*;
pub use prompt_cache::*;
pub use review_read_receipt::*;
pub use session_manager::*;
pub use session_store_port::*;
pub use token_anchor::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! Compatibility facade for session-scoped code-review read receipts.

pub use openbitfun_agent_runtime::review_read_receipt::{
FileRevision, ReviewReadCoverage, ReviewReadReceiptStore,
};
Loading
Loading