Land v0.9.0 CLOS codec with subject/object relation slots #8

Merged
lost-rob0t merged 45 commits from agent/v09-codec-merge into master 2026-08-09 03:00:18 +00:00
lost-rob0t commented 2026-08-03 02:18:36 +00:00 (Migrated from github.com)

Summary

Rebases the stranded v0.9.0 CLOS codec (originally PR #4, branch agent/issue-13-codec-semantics) onto current master and adds subject/object as first-class relation slots.

Supersedes closed PR #1.

What this delivers

  • CLOS document class upgraded to v0.9.0: data slot, schema-version, integer version, ISO-8601 string timestamps, full envelope slots (sources/evidence/temporal/provenance/…), *default-hash-algo* = :sha256.
  • encode-document-v09 codec: wraps dtype slots in data, emits snake_case wire keys, synthesizes subject/object from source/target for relations.
  • Subject/object first-class relation slots: relation class now has subject/object slots alongside legacy source/target. initialize-instance :after keeps both pairs in sync. new-relation accepts :subject/:object keywords. The encoder emits all four fields; normalize-required-data-v09 fills missing aliases bidirectionally.
  • digest-id function: pure SHA-256 hex digest for deterministic document IDs without a document instance.
  • v0.9.0 JSON schema file: added so v090-test is self-contained.
  • Type aliases, schema-org mapping, DSL exports, closer-mop dependency from the original branch.

Backward compatibility

  • source/target remain as legacy aliases on relations — existing callers (-> helper, new-relation positional args) work unchanged.
  • new-relation signature is backward-compatible: :subject/:object are optional keywords.
  • Legacy 0.8.0 validation (v090.lisp) is preserved alongside the new codec.

Test results

  • SBCL FiveAM: 257/257 pass (227 original + 30 new for subject/object + digest-id)
  • Python v0.9 contract: 9/9 pass
  • git diff --check clean

Conflicts resolved during rebase

  • src/documents.lisp: master kept legacy 0.8.0; resolved in favor of the v0.9.0 upgrade.
  • src/starintel.asd: combined deps (master's com.inuoe.jzon + cl-ppcre + branch's closer-mop); kept both v090 and json-v09 components.
  • starintel-test.asd: kept branch's required-test gate + master's v090-test file.
  • flake.nix: took branch's cleaner test error reporting.
## Summary Rebases the stranded v0.9.0 CLOS codec (originally PR #4, branch `agent/issue-13-codec-semantics`) onto current master and adds subject/object as first-class relation slots. Supersedes closed PR #1. ## What this delivers - **CLOS `document` class upgraded to v0.9.0**: `data` slot, `schema-version`, integer `version`, ISO-8601 string timestamps, full envelope slots (`sources`/`evidence`/`temporal`/`provenance`/…), `*default-hash-algo*` = `:sha256`. - **`encode-document-v09` codec**: wraps dtype slots in `data`, emits snake_case wire keys, synthesizes `subject`/`object` from `source`/`target` for relations. - **Subject/object first-class relation slots**: `relation` class now has `subject`/`object` slots alongside legacy `source`/`target`. `initialize-instance :after` keeps both pairs in sync. `new-relation` accepts `:subject`/`:object` keywords. The encoder emits all four fields; `normalize-required-data-v09` fills missing aliases bidirectionally. - **`digest-id` function**: pure SHA-256 hex digest for deterministic document IDs without a document instance. - **v0.9.0 JSON schema file**: added so `v090-test` is self-contained. - **Type aliases, schema-org mapping, DSL exports, closer-mop dependency** from the original branch. ## Backward compatibility - `source`/`target` remain as legacy aliases on relations — existing callers (`->` helper, `new-relation` positional args) work unchanged. - `new-relation` signature is backward-compatible: `:subject`/`:object` are optional keywords. - Legacy 0.8.0 validation (`v090.lisp`) is preserved alongside the new codec. ## Test results - **SBCL FiveAM**: 257/257 pass (227 original + 30 new for subject/object + digest-id) - **Python v0.9 contract**: 9/9 pass - `git diff --check` clean ## Conflicts resolved during rebase - `src/documents.lisp`: master kept legacy 0.8.0; resolved in favor of the v0.9.0 upgrade. - `src/starintel.asd`: combined deps (master's `com.inuoe.jzon` + `cl-ppcre` + branch's `closer-mop`); kept both `v090` and `json-v09` components. - `starintel-test.asd`: kept branch's required-test gate + master's `v090-test` file. - `flake.nix`: took branch's cleaner test error reporting.
Sign in to join this conversation.
No description provided.