Skip to content

docs(filereads): add the FileReads owner contract - #2153

Closed
eric8810 wants to merge 1 commit into
mainfrom
dim/2028-filereads
Closed

eric8810 wants to merge 1 commit into
mainfrom
dim/2028-filereads

Conversation

@eric8810

@eric8810 eric8810 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Owner: FileReads
Batch: 1
Scan issue: #2028
Old PR: #2100
Contract: docs/design/plugins/FileReads.md
Base: origin/main 82a91e66a
Head: 64c0d60da

What

Adds the FileReads owner contract: the per-branch text bindings a file tool establishes, the record path, the Load rebuild, the compaction rule and the write/edit admission checks. The file tools are callers; the owner holds the bindings for one line.

Shared rows:

  • docs/design/contracts/runtime-owner-operations.md: record({path, binding, established, ordinal}), the call-event pair.
  • docs/design/resource-faces.md: the file-tool result fields.
  • docs/design/service-faces.md: the fileReads row.
  • docs/design/plugins/README.md / zh: owner index row and By-scope branch part.

Dependencies

None in batch 1. ToolExecutor supplies the call's sequence/ordinal in ToolExecutionContext (optional; None for the batch claim and drivers). WorkspaceTools and the file tools are callers.

Supersedes

  • docs/architecture/rust-agent/plugins/WorkspaceTools.md §FileReads: the binding and admission statements.
  • docs/design/resource-faces.md §4.3 and the file-tool result fields.
  • docs/design/timeline-branches.md and zh: the binding wording.
  • docs/design/compaction-quality.md §7.3/§8 and zh: the compaction read.
  • docs/design/plugins/README.md / zh: owner index row.

Design decisions

  • One binding per canonical path, owned by the line; a fork starts empty (its own operations only).
  • record and Load order by the call event's sequence and the call's ordinal; a parent and a Code Mode child are ordered by their own events.
  • Load folds this line's results at one cutoff and only results that carry a revision and a call_event_id.
  • read, write and edit results carry the installed TextFileBinding as structuredContent.binding; a read keeps its flat fields beside it.
  • read, write and edit hold the per-path lock from before their checks or read until after record.
  • A compaction retain_from at or before the line's start, including an inherited cut, precedes every operation on the line.
  • unavailable {compacted} is a write answer; edit answers bound or unavailable {neverRead}.

Review record

  • Pre-review rounds 1-7: no open P1/P2; all P3s fixed.
  • yyhhyyyyyy-style mock review: 3 rounds plus 2 deltas, 无 P1/P2.
  • zerob13-style mock review: 3 rounds plus 2 deltas, 无 P1/P2.
  • One non-blocking P3: the driver's definitions clause in the compatibility sentence.

Ready check

  • Every operation, error and caller next step defined.
  • §7.1/§7.2 and ADR 002 rows answered.
  • Dependencies match the batch table.
  • Pre-review and both mock reviews 无 P1/P2.
  • node scripts/adr-check.mjs --base origin/main, cargo run --locked -p xtask-check, git diff --check pass.
  • No maintainer question.

Refs #2028

@eric8810

Copy link
Copy Markdown
Collaborator Author

Closing as part of abandoning the owner-split experiment.

@eric8810 eric8810 closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant