Repository navigation
Completion of Legacy Polishing - #221
Merged
Merged
Conversation
The saved generation.block_unrequested_cjk option is now required. Package defaults supply values when creating a project; they no longer fill an absent field when opening a saved profile. Creation provenance is also mandatory. The profile must contain all five fields: - created_with_kilin - created_with_project_type - created_with_project_type_version - created_with_project_type_schema_version - created_with_project_type_sha256 Missing or malformed creation metadata is rejected without rewriting the profile or inventing a creation identity. The corresponding object contracts are enforced as well: ProjectProfile requires the CJK setting, and QAProject.creation_provenance is required and nonnullable.
One shared validator defines current conversation state
kilin.conversation_format now owns the shared structural validation used by persistence and its consumers. It remains independent of RAG, model, and GUI imports.
The schema distinguishes legitimate lifecycle states from incomplete records:
Area Enforced behavior
Registration metadata The complete group may be absent for a core-only conversation; partial registration metadata is invalid.
Resumable history system_prompt and turns form a complete group.
Completed turns UUID, timestamp, question, answer, evidence, parameters, and timeline must all be present.
Nullable fields A valid null must be explicitly stored. Absence no longer substitutes for null.
Fixed records Unknown fields are rejected.
Turn parameters Remain extensible, but must contain valid finite JSON values.
Checkpoints Outer and inner IDs, turn count, and the saved conversation-content hash must agree.
For example, timeline: null remains a valid current untimed answer. A completed turn with no timeline field is rejected.
Evidence records likewise require their complete current fields, including explicit nullable cell and context_role values. Scalar coercions such as converting a string citation into an integer have been removed.
A missing conversation file can start a new history. An existing malformed document, an existing {} document without the canonical envelope, or a nonregular target cannot silently become a new empty history.
Validation precedes persistence and initialization
RAG and TraceLogger validate existing conversation state under the existing ownership rules before project diagnostics, indexing, or model initialization.
Writes validate the complete merged candidate. TraceLogger validates a detached copy so later caller mutation cannot alter the accepted snapshot. Rejected state and failed writes preserve the previous saved conversation bytes and committed in-memory state; turns are committed only after persistence succeeds.
Conversation-store operations use the same validation. Discovery exposes rejected paths and reasons through discovery_errors(), while valid registered conversations remain accessible. An all-invalid catalog raises an error instead of creating an empty replacement conversation.
Consumers use the same schema
Conversation memory, read-only inspectors, GUI file reading, usage totals, and system-test inspection now use the shared current-state validation.
Two additional defects found during implementation are covered:
- A saved memory index cannot bypass the first schema validation in a process merely because its file signatures match. Subsequent unchanged reads can reuse the validated observation.
- GUI usage totals deduplicate by durable turn UUID. Independent answers with identical text and timestamps remain distinct. Invalid usage data in one branch copy cannot hide valid usage from another copy.
The current diagnostic writer’s support for NaN and infinities is preserved outside resumable state. A regression test exercises emit, close, reopen, and RAG loading. Nonfinite values inside resumable parameters are rejected. This preserves the current diagnostic contract without accepting incomplete historical conversation formats.
Use only current versioned macOS runtimes Remove historical runtime activation without modifying obsolete installations. Require matching release identity and complete executable entry points. Reject unsafe managed runtime paths before installation, cleanup or activation. Preserve atomic activation, locking, failure recovery and existing releases. Retain current backend repair and legitimate ancestor/interpreter aliases. Extend regression tests and update developer and release documentation.
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.
No description provided.