Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 10.8 KB

function-owners.md

File metadata and controls

37 lines (30 loc) · 10.8 KB

D008-r2 — explicit ownership for reviewed functions

Status: Proposed baseline; individually adopted entries are identified by their linked decision records. This is not blanket acceptance of the table. Author decisions under the user's delegation, based on the same-SHA Phase 2/3 source text. Audit-model suggestions are not automatically treated as accepted. Target directories and names are design; this does not claim the production code already exists, and unreviewed functions are not moved merely because of their file name. This table resolves owner choices raised in discussion; it does not make later B/Apps/Agent implementation a prerequisite for P0a/K01/H01.

Existing file / symbol Chosen owner and target responsibility Migration / retention constraint
harness/skill_evaluation: CodexClient/global_skills/client_config/toml_value; the execution part of run_trial H agents/execution-side host adaptation argv/host config/execution/retention belong to H; if run_trial calls scoring/statistics/export internally, those must be split to B/Apps and composed through injected ports; the original mixed function is not relabelled as pure H as a whole
same file trace_metrics/normalize_usage H capture fact parsing and normalized UsageObservation Do not adopt the Phase 2 suggestion to place normalize_usage in B; B consumes local usage DTOs converted by Apps, does not import H, and does not parse provider events
same file valid_checks/task_verdict B fixed criteria/legacy rules kept separate from execution facts; old evaluate behavior compared unchanged
same file summarize B statistics/comparison eligibility; Apps presentation only business statistics are not migrated wholesale into presentation; B is still not allowed to call H
same file export_bundle Apps composing K reads + H fixed retention H execution core never imports K; export hands over actual bytes only
skill_eval_diagnostic task definition/validate_task/expected/verify B task/pure criteria; main as a B-defined worker entry worker started by H; prepare/assess do not execute main
skill_eval_engineering task/vectors/validate_task B task-owned definition and pure vector judgment verify must be split from process start; offline assess does not re-measure through an execution port
same file materialize_generated_artifact/read_regular/input_hashes/SandboxUnavailable/RUNNER/sandbox_command/_invoke H input capture/sandbox execution capability real capability/control domain tested in the later H02 PR; B consumes fixed output only
harness/runner execution/termination/directory/state events H execution and facts; AB/BA/repetitions → B protocol/worker; write_report → Apps old run unchanged; migrating old evaluate decouples the runner first; new H scoring cannot be retained by attaching a legacy label
harness/improvement usage_totals/assessment/holdout_accepts/rerun_assessment B experiment validity/comparison/acceptance rules; budget admission/reservation/charging reconciliation remains H read normalized facts only; provider parsing does not move because of import convenience
same file choose H search progression; SelectionPolicy split into B threshold rules and H progression/stop policy no shared business Policy class; Apps does not create a retry loop
harness/knowledge_capture assemble_context_text/_item K pure knowledge text projection Apps connects K/H; Apps gives H the fixed expected text/hash; H stores the actually delivered text/hash; verify_capture byte integrity belongs to H and does not call K assembly in reverse; it is not a task-benefit verdict
harness/trials/external execute_trial/collect_trial_checks H: run one command through execute_command, retain its record, and collect the trial checks; semantic metric validation (read_metric/validate_metric) is B and lives in benchmark/metrics.py execute_trial applies only the metric callable the caller injects and holds no metric rule; offline assess executes nothing
campaign_records STAGES/claim capture/reconciliation H records; dashboard/report presentation → Apps first remove the campaign_records → dashboard_data reverse dependency; #333 is Proposed and no claim is made that a unified event envelope is accepted
catalog.repository_pack/REPO_TYPES D020 neutral raw-data technical leaf; target interpretation stays H K does not expose the pack reader publicly; infra changes only its same-leaf import; seven K bodies/root entries/tests move together
apps/views/dashboard_workflow command_state/run_workflow/validation_progress (added with the OBS dissolve; adopted owner: Apps views; RSI-master architecture decision 2026-11-14 Asia/Shanghai, recorded in the D008 wave-2 ownership decision; independent PR review remains separate) Apps views: read-only presentation projection of workflow and command state The module imports only the standard library and reads records the caller already loaded; it has no H, K or Benchmark edge. A group state such as completed is a display state for the run workflow, not a verdict, and must not be read as the legacy Verdict. validation_progress only validates counters from a snapshot dashboard_data has already read; it opens no file.
harness/records/profile_timeline attach_profile, _compile (builds the bounded dashboard overview stored with the record), fixed-byte verification, and digest reads (read_profiles/profile_event_table) (added with the OBS dissolve; adopted owner: H records; RSI-master architecture decision 2026-11-14 Asia/Shanghai, recorded in the D008 wave-2 ownership decision; independent PR review remains separate) H records: attach a reviewed profile, compile the stored overview from those bytes, and verify stored bytes Record, overview-compile and byte-integrity paths stay in H because the overview is record content: it is computed once at attach from a bounded trace and published content-addressed, so the stored bytes cannot depend on who renders them. Its top-lane, longest-event and top-kernel selection reduces one trace for a bounded record; it ranks no candidate, run or claim and produces no verdict. UI route decoration, including events_url, belongs to Apps views, not H. Issue #413's broad timeline-to-Apps placement is refined here: persisted factual records and bounded overview encoding stay in H; UI projections and route decoration belong to Apps. The route decoration is removed from H in this PR, preserving stored bytes, digest verification and the external view response.
apps/views/profile_searches pre_profile_searches (added with the OBS dissolve; adopted owner: Apps views; RSI-master architecture decision 2026-11-14 Asia/Shanghai, recorded in the D008 wave-2 ownership decision; independent PR review remains separate) Apps views: Dashboard-consumed presentation list relating a profile capture to named searches completed before it It joins an H record with ledger read models, which only Apps may assemble. Its verified/not_before/unknown_time values are display annotations over an existing search state; they are not evidence for a claim, and using them that way needs a new owner decision.
benchmark/sampling collect_samples (moved out of harness/scenarios/media by the old-run split; ownership disposition: B sampling; RSI-master adopted decision, 2026-11-14 Asia/Shanghai; independent PR review remains separate) B sampling: seed ordering, timing records and artifact hashes Request transport stays with the caller's injected request(item, path) callback; Benchmark hashes artifacts with its own _sha256, pinned to infra.artifacts.sha256 by tests/test_legacy_run_split.py::test_sampling_sha256_matches_the_infra_hasher, and imports no H or infra module. The per-group progress line on stdout is the old run protocol output kept for D022 and is a protocol constraint, not a presentation owner.
harness/runner snapshot port (repo, exclude) -> dict (separated from the runner by the old-run split; ownership disposition: H port contract, Apps legacy binding, infra/targets implementation; RSI-master adopted decision, 2026-11-14 Asia/Shanghai; independent PR review remains separate) H owns the port and its contract; the Apps legacy composition owns the binding; infra/targets owns the Git identity implementation H keeps the port required and keyword-only with no default and holds no copy of the implementation. apps/legacy/run.py binds snapshot=repository_identity for the old run and the root execution.py forwards it. A change of the binding owner needs its own review. Out-of-tree callers that used the removed H defaults are not covered by this row.

D008 rows are architecture decisions under the delegation recorded at the top of this file. An independent reviewer verifies the cited code, tests and dependency direction and may block on a missing adoption record; a reviewer does not choose the owner, and a PR approval is not the D008 adoption record. The architecture owner records adoption in the governed contract or decision record; the rows cite that decision record, independently of PR approval.

Any later split of a mixed function is accepted by real pytest/host/wheel/record comparison in the corresponding PR; none of this delays today's contract or gate-policy start. Existing external public composed entries keep their original semantics and paths per D018/D022, and an owner change cannot be used to delete an old promise.

Implemented rows

The skill-evaluation split (#410) implements the skill_evaluation, skill_eval_diagnostic, skill_eval_engineering and improvement rows. H keeps harness/skill_evaluation.py, harness/artifact_sandbox.py and harness/improvement.py; B holds benchmark/skill_evaluation.py, benchmark/skill_eval_diagnostic.py, benchmark/skill_eval_engineering.py and benchmark/improvement.py; Apps composes them in apps/workflows/skill_evaluation.py, apps/workflows/skill_eval_engineering.py and apps/workflows/improvement.py. Two points follow the tree as it stands after #338, not the row text:

  • usage_totals stays in harness/usage.py, because harness/optimization.py consumes it for budget accounting. B assessment receives the baseline and candidate totals from Apps and does not import H.
  • SelectionPolicy holds only the two thresholds, so it lives whole in B. H choose receives the assessments, the validity block and the composition flag; it holds no threshold and no policy class.