Repository navigation
feat(harness-state): persist content-addressed harness state bundles - #62
Closed
Issacboy123 wants to merge 3 commits into
Closed
Issacboy123 wants to merge 3 commits into
Issacboy123 wants to merge 3 commits into
Conversation
Issacboy123
marked this pull request as ready for review
August 15, 2026 23:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Diffex needs a stable representation for evolvable harness configuration before consumers or evolution workflows can operate on it. This PR adds a private harness-state package that persists the system prompt as a validated portable directory bundle, identifies its exact content with derived SHA-256 metadata, and provides the canonical clean-default state.
Reasoning
Keeping the schema and persistence contract in a dedicated private package gives future consumers one runtime-validated ownership boundary without coupling storage to the coding agent. A content hash identifies and verifies the stored prompt without introducing a numerical schema version that does not represent the harness content. The algorithm-prefixed digest leaves the metadata self-describing, while the strict two-file layout, sibling staging, and final rename keep bundles inspectable and prevent normal saves from exposing partial destinations.
Changes
@diffexai/diffex-harness-stateESM workspace package with strict TypeBox schemas and inferred readonly state and manifest types.EVOLVE.mdbytes, with automatic generation during saves and verification during loads.Testing
node ../../node_modules/vitest/dist/cli.js --run test/harness-state.test.tsnpm run check