You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VAL-C1b: Commit validation integration and rejection surface
1. Summary (Required)
What is the enhancement?
Complete Capability 1 by integrating the VAL-C1a validator with public Commit. Commit will assess
the complete Nursery before any persistence write, reject semantic violations without writing, and
return a typed rejection response whose per-holon findings remain available through the staged pool.
This issue adds the CommitResponse rejection surface, Nursery orchestration, and the
assess → plan → write Commit structure. It preserves existing success and operational-failure
behavior.
2. Problem Statement (Required)
Why is this needed?
VAL-C1a delivers active validation bindings, handlers, reports, and clean corpus conformance, but
nothing invokes that validator during production Commit.
The current guest Commit immediately begins its two persistence passes. Once the first node is
written, semantic rejection can no longer guarantee zero writes. The current response also
distinguishes only Complete and Incomplete, conflating semantic refusal with operational
persistence failure.
Capability 1 is not a vertical slice until public Commit:
validates every staged holon on every attempt
rejects findings before persistence
keeps rejected transactions open for correction
reports rejection distinctly from abandonment and operational failure
preserves findings through the existing staged-holon wire path
3. Dependencies (Required)
Does this depend on other issues or features?
VAL-C1a — required. Supplies the validator, active bindings, handlers, report, registries, and
clean canonical corpus.
Does not depend on: Capability 2. VAL-C1b completes the Capability 1 vertical slice using only
the cohort delivered by VAL-C1a.
4. Proposed Solution (Required)
How would you solve it?
4.1 Add Nursery validation orchestration
Add the holons_validation entry point over a complete Nursery and invoke it from the single
production guest Commit path.
Each Commit attempt must:
assess every staged holon regardless of prior ValidationState
replace validation state and findings together
preserve operational errors separately
return CommitValidationReport for completed semantic assessment
return Err(HolonError) when assessment cannot complete reliably
CommitValidationReport remains guest-internal, unbound, and unserialized.
4.2 Gate the existing Commit persistence path
Invoke Nursery validation before entering either existing persistence pass.
If assessment produces findings:
reject the complete persistence-candidate set;
do not invoke node or SmartLink persistence;
retain staged candidates and their replacement findings;
leave the transaction Open; and
return CommitRequestStatus = Rejected.
If assessment succeeds, continue through the existing two-pass Commit implementation. Preserve its staged-state transitions, relationship snapshot-and-drop-lock discipline, SmartLink behavior, and operational partial-write semantics.
This issue does not introduce a first-class Commit persistence plan or otherwise restructure node and relationship persistence. The Nursery and its StagedHolon states remain the authoritative Commit workset. This issue adds a validation gate over that workset before the existing persistence passes; it does not introduce a second, separately materialized Commit-plan representation.
4.3 Add the Commit rejection schema surface
Update schema-src/dance/schema.tdl with:
Rejected in CommitRequestStatus.MapEnumValueType
RejectedHolons / RejectedByCommit
ValidationViolationCount.PropertyType using MapInteger
RejectedHolons contains staged holons associated with findings. The count is derived from the
in-memory report.
Do not add ValidationReport.PropertyType or serialize the report. Per-holon findings travel with
the staged pool already exported as session state.
Regenerate generated/json-imports/dance/schema.json and affected operational
bootstrap/resource projections through map-schema.
4.4 Propagate rejection status
Add the corresponding type-name constants and update existing status consumers:
RejectedHolons / RejectedByCommit and derived ValidationViolationCount are implemented.
No serialized validation-report property is added.
LoadCommitStatus and all current transaction, loader, and Sweettest consumers handle Rejected distinctly.
Dance, loader, bootstrap, and resource projections are regenerated through map-schema.
End-to-end tests prove rejection, zero writes, retained findings, successful correction, and
accepted canonical bootstrap.
Formatting, checks, unit tests, and Sweettests pass.
Optional Details (Expand if needed)
8. Alternatives Considered
Validate inside the existing persistence loop: rejected because earlier holons could already
be written before a later violation is found.
Return Incomplete for validation findings: rejected because semantic refusal and operational
failure have different retry and diagnostic meanings.
Serialize CommitValidationReport: rejected because per-holon findings already cross the
boundary through the staged pool and the string form would be opaque to MAP’s type system.
Wait for Capability 2: rejected because VAL-C1a provides everything required to complete the
Capability 1 vertical slice.
9. Risks or Concerns
Validation outcome writeback must complete before persistence begins and must preserve existing operational errors and relationship lock discipline.
Rejection changes loader accounting assumptions: rejected holons are neither saved nor abandoned.
Generated schema changes affect loader metrics and copied bootstrap/resource projections.
VAL-C1b: Commit validation integration and rejection surface
1. Summary (Required)
What is the enhancement?
Complete Capability 1 by integrating the VAL-C1a validator with public Commit. Commit will assess
the complete Nursery before any persistence write, reject semantic violations without writing, and
return a typed rejection response whose per-holon findings remain available through the staged pool.
This issue adds the
CommitResponserejection surface, Nursery orchestration, and theassess → plan → write Commit structure. It preserves existing success and operational-failure
behavior.
2. Problem Statement (Required)
Why is this needed?
VAL-C1a delivers active validation bindings, handlers, reports, and clean corpus conformance, but
nothing invokes that validator during production Commit.
The current guest Commit immediately begins its two persistence passes. Once the first node is
written, semantic rejection can no longer guarantee zero writes. The current response also
distinguishes only
CompleteandIncomplete, conflating semantic refusal with operationalpersistence failure.
Capability 1 is not a vertical slice until public Commit:
3. Dependencies (Required)
Does this depend on other issues or features?
clean canonical corpus.
findings, staged/wire projection, and controlled outcome replacement.
Does not depend on: Capability 2. VAL-C1b completes the Capability 1 vertical slice using only
the cohort delivered by VAL-C1a.
4. Proposed Solution (Required)
How would you solve it?
4.1 Add Nursery validation orchestration
Add the
holons_validationentry point over a complete Nursery and invoke it from the singleproduction guest Commit path.
Each Commit attempt must:
ValidationStateCommitValidationReportfor completed semantic assessmentErr(HolonError)when assessment cannot complete reliablyCommitValidationReportremains guest-internal, unbound, and unserialized.4.2 Gate the existing Commit persistence path
Invoke Nursery validation before entering either existing persistence pass.
If assessment produces findings:
If assessment succeeds, continue through the existing two-pass Commit implementation. Preserve its staged-state transitions, relationship snapshot-and-drop-lock discipline, SmartLink behavior, and operational partial-write semantics.
This issue does not introduce a first-class Commit persistence plan or otherwise restructure node and relationship persistence. The Nursery and its StagedHolon states remain the authoritative Commit workset. This issue adds a validation gate over that workset before the existing persistence passes; it does not introduce a second, separately materialized Commit-plan representation.
4.3 Add the Commit rejection schema surface
Update
schema-src/dance/schema.tdlwith:RejectedinCommitRequestStatus.MapEnumValueTypeRejectedHolons/RejectedByCommitValidationViolationCount.PropertyTypeusingMapIntegerRejectedHolonscontains staged holons associated with findings. The count is derived from thein-memory report.
Do not add
ValidationReport.PropertyTypeor serialize the report. Per-holon findings travel withthe staged pool already exported as session state.
Regenerate
generated/json-imports/dance/schema.jsonand affected operationalbootstrap/resource projections through
map-schema.4.4 Propagate rejection status
Add the corresponding type-name constants and update existing status consumers:
TransactionContext::should_transition_from_commit_responseLoadCommitStatus.MapEnumValueTypeLoadCommitStatusRejectedmeans assessment completed and persistence was refused. It must not be treated asIncomplete,Skipped,Abandoned, or an unexpected status.4.5 Add end-to-end demonstrations
Through the public Commit path, demonstrate:
CompleteRejectedbefore any writeIncomplete5. Scope and Impact (Required)
What does this impact?
Modified:
happ/crates/holons_guest/src/guest_shared_objects/commit_functions.rsholons_validationNursery orchestrationTransactionContextCommit status handlingschema-src/dance/schema.tdlschema-src/core/loader-types.tdltype_namesproperty and relationship identitiesOut of scope:
Behavioral impact: public Commit can now reject semantically invalid staged state before writing.
6. Testing Considerations (Required)
How will this enhancement be tested?
Unit tests:
Rejecteddoes not transition the transaction fromOpenCompletestill transitions normallyRejectedwithout converting it toIncompleteorSkippedSweettests:
RejectedHolonsidentifies finding-bearing staged holonsIncompleteRun:
npm run fmt:checknpm run checknpm run test:unitnpm run sweetest(maintainer-run under Nix)7. Definition of Done (Required)
When is this enhancement complete?
HolonError; persistence failures remainIncomplete.CommitRequestStatusincludesRejected.RejectedHolons/RejectedByCommitand derivedValidationViolationCountare implemented.LoadCommitStatusand all current transaction, loader, and Sweettest consumers handleRejecteddistinctly.map-schema.accepted canonical bootstrap.
Optional Details (Expand if needed)
8. Alternatives Considered
be written before a later violation is found.
Incompletefor validation findings: rejected because semantic refusal and operationalfailure have different retry and diagnostic meanings.
CommitValidationReport: rejected because per-holon findings already cross theboundary through the staged pool and the string form would be opaque to MAP’s type system.
Capability 1 vertical slice.
9. Risks or Concerns
10. Additional Context