Skip to content

Persist runtime indexes and split submit acknowledgement - #26

Merged
piaro merged 1 commit into
mainfrom
perf/persist-index-and-split-submit
Aug 30, 2026
Merged

piaro merged 1 commit into
mainfrom
perf/persist-index-and-split-submit

Conversation

@piaro

@piaro piaro commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Outcome

This change removes repository-wide reevaluation from the successful submit acknowledgement path and avoids reparsing unchanged runtime inputs.

Why

Submitting a Result previously persisted the record and then calculated the next Action before replying. Repository observation and Contract Health also rebuilt derived data from source records on each evaluation. As history grew, callers could time out without a clear acknowledgement of whether persistence had completed.

Main changes

  • Return from adf_submit after Result validation and persistence. Call adf_next separately to continue.
  • Add submit output v2 with result_id, already_completed, next_required, and per-stage timings.
  • Add per-stage timings to adf_next while keeping its v1 output schema backward compatible.
  • Cache repository observations by revision, analysis configuration, signal catalog, and every declared or discovered source identity.
  • Persist compact Contract Health indexes for Results and Evidence. Clean tracked records use Git blob IDs; changed and untracked records use content hashes.
  • Preserve original record digests and never rewrite existing Result or Evidence files. Legacy repeated outcome references are compacted only inside the derived index.
  • Rebuild corrupt cache entries from source and write runtime caches only when Git confirms that the cache path is ignored.
  • Keep derived runtime caches outside Migration candidate integrity checks.
  • Update the MCP design, role skills, project guide, English README, Japanese concepts, implementation notes, schemas, and integration tests.

Compatibility

adf_submit output changes from v1 to v2 because it no longer embeds the next response or issued Action. The submit input remains v1. Existing stored Records and their identifiers are unchanged.

Verification

  • cargo fmt --check
  • cargo clippy --all-targets --locked -- -D warnings
  • cargo test --locked
  • sh scripts/tests/test-rust.sh

@piaro piaro self-assigned this Aug 30, 2026
@piaro
piaro merged commit a0ef50d into main Aug 30, 2026
3 checks passed
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