Notes: calternal-notes-core (identity, frontmatter, links, rename plan, day files, composer parser) #8

Open
opened 2026-09-24 07:51:09 +00:00 by kayg · 14 comments
Owner

Codex job notes-core.

Base: 79cae304a8

Codex job `notes-core`. Base: 79cae304a8cfd52d5de562b7c9c65e7d57c3bbeb
Author
Owner

Starting calternal-notes-core on branch job/notes-core at base 79cae304a8. I am reading the Rust design and calternal.js reference contracts before implementing within crates/calternal-notes-core/**.

Starting calternal-notes-core on branch job/notes-core at base 79cae304a8cfd52d5de562b7c9c65e7d57c3bbeb. I am reading the Rust design and calternal.js reference contracts before implementing within crates/calternal-notes-core/**.
Author
Owner

Finding: the requested worktree has no crates/ directory and no Cargo.toml (ls -la shows only docs/, scripts/, and root files; find . -maxdepth 3 -name Cargo.toml returned no paths). I am treating crates/calternal-notes-core/** as the authorized new crate path and will scaffold it there.

Finding: the requested worktree has no `crates/` directory and no Cargo.toml (`ls -la` shows only docs/, scripts/, and root files; `find . -maxdepth 3 -name Cargo.toml` returned no paths). I am treating `crates/calternal-notes-core/**` as the authorized new crate path and will scaffold it there.
Author
Owner

Composer regression evidence: the new owner-reported case (on and off working on calternal.js 09:30 #work) fails against the initial stub because the title still contains the time and tag. The test expects only those token spans to be removed while retaining on and off; I am implementing that span-based behavior now.

Composer regression evidence: the new owner-reported case (`on and off working on calternal.js 09:30 #work`) fails against the initial stub because the title still contains the time and tag. The test expects only those token spans to be removed while retaining `on and off`; I am implementing that span-based behavior now.
Author
Owner

Composer parity finding: the calternal.js nlp/tests.rs::contract_range_with_tag vector expects bare 2-3 shipped v1 #work to resolve to 14:00–15:00. The initial local expectation treated it as 02:00–03:00. The parser and JSON fixture now follow the reference's afternoon disambiguation; all related composer checks pass.

Composer parity finding: the calternal.js `nlp/tests.rs::contract_range_with_tag` vector expects bare `2-3 shipped v1 #work` to resolve to 14:00–15:00. The initial local expectation treated it as 02:00–03:00. The parser and JSON fixture now follow the reference's afternoon disambiguation; all related composer checks pass.
Author
Owner

Finding: the reference contract keeps legacy linked-title events readable as title + legacy target, with that target first in attachments. Child attachment bullets must be standalone local links; links in prose, external links, fenced code, and nested content are not attachments. Implemented those projections and added regression coverage in crates/calternal-notes-core/src/dayfile.rs.

Finding: the reference contract keeps legacy linked-title events readable as title + legacy target, with that target first in attachments. Child attachment bullets must be standalone local links; links in prose, external links, fenced code, and nested content are not attachments. Implemented those projections and added regression coverage in crates/calternal-notes-core/src/dayfile.rs.
Author
Owner

Finished the notes-core implementation.

Branch: job/notes-core
Base: 79cae304a8cfd52d5de562b7c9c65e7d57c3bbeb
Head: 33c90c956ffce8f6f63eaaa902364ff74e248a54

Gates exited 0. Captured output:

cargo fmt --manifest-path crates/calternal-notes-core/Cargo.toml --check
(no stdout or stderr)

cargo clippy --manifest-path crates/calternal-notes-core/Cargo.toml --all-targets -- -D warnings

    Checking calternal-notes-core v0.1.0 (/home/kayg/Developer/calternal-wt/notes-core/crates/calternal-notes-core)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.76s

cargo test --manifest-path crates/calternal-notes-core/Cargo.toml

test result: ok. 37 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

cargo clean --manifest-path crates/calternal-notes-core/Cargo.toml output:

     Removed 342 files, 149.3MiB total

The worktree is clean. No Cargo.lock is committed.

Finished the notes-core implementation. Branch: `job/notes-core` Base: `79cae304a8cfd52d5de562b7c9c65e7d57c3bbeb` Head: `33c90c956ffce8f6f63eaaa902364ff74e248a54` Gates exited 0. Captured output: `cargo fmt --manifest-path crates/calternal-notes-core/Cargo.toml --check` (no stdout or stderr) `cargo clippy --manifest-path crates/calternal-notes-core/Cargo.toml --all-targets -- -D warnings` ```text Checking calternal-notes-core v0.1.0 (/home/kayg/Developer/calternal-wt/notes-core/crates/calternal-notes-core) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.76s ``` `cargo test --manifest-path crates/calternal-notes-core/Cargo.toml` ```text test result: ok. 37 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` `cargo clean --manifest-path crates/calternal-notes-core/Cargo.toml` output: ```text Removed 342 files, 149.3MiB total ``` The worktree is clean. No Cargo.lock is committed.
Author
Owner

Starting notes-core parity work on branch job/notes-parity, based on d8cd701ce81807e21104ba743ecf3edc5e27d0b3.

Starting notes-core parity work on branch `job/notes-parity`, based on `d8cd701ce81807e21104ba743ecf3edc5e27d0b3`.
Author
Owner

Finding: crates/calternal-notes-core/src/frontmatter.rs already places calternal-events after slug and normalizes links through the shared writer. docs/DESIGN.md still lists only slug, user keys, tags, so the prose omits the event tier specified in this job.

Progress: the first package run passed 216 unit tests and 11 vector integration tests. The port now includes the full entry NLP parser, reminders, Markdown block IDs, composer helpers, Note creation, resolver, and pure index projections.

Finding: `crates/calternal-notes-core/src/frontmatter.rs` already places `calternal-events` after `slug` and normalizes links through the shared writer. `docs/DESIGN.md` still lists only `slug, user keys, tags`, so the prose omits the event tier specified in this job. Progress: the first package run passed 216 unit tests and 11 vector integration tests. The port now includes the full entry NLP parser, reminders, Markdown block IDs, composer helpers, Note creation, resolver, and pure index projections.
Author
Owner

Finding from the reference rewrite tests: image embeds that happen to point at a Note path must stay unchanged during a Note retitle. The Rust core rewrite helper was rewriting those destinations. I excluded embeds from Note link rewrites and updated the retitle regression to expect one ordinary link edit while preserving the image embed. The same pass ported Daily note tests for retaining a missing final newline when a new final bullet is appended.

Finding from the reference rewrite tests: image embeds that happen to point at a Note path must stay unchanged during a Note retitle. The Rust core rewrite helper was rewriting those destinations. I excluded embeds from Note link rewrites and updated the retitle regression to expect one ordinary link edit while preserving the image embed. The same pass ported Daily note tests for retaining a missing final newline when a new final bullet is appended.
Author
Owner

Finding/update: the first workspace Clippy run found lint failures in newly ported notes-core code (mostly collapsible conditionals and doc-list formatting). I applied the mechanical fixes inside crates/calternal-notes-core and reran the exact workspace gate successfully:

CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 cargo clippy --all-targets -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.67s
Finding/update: the first workspace Clippy run found lint failures in newly ported notes-core code (mostly collapsible conditionals and doc-list formatting). I applied the mechanical fixes inside crates/calternal-notes-core and reran the exact workspace gate successfully: CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 cargo clippy --all-targets -- -D warnings Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.67s
Author
Owner

Finding/correction: the earlier parity table marked the 14 pure legacy path and Log-link rewrite tests as out of scope. That was incorrect: docs/DESIGN.md §17 says calternal.js imports translate lowercase paths. I am porting the pure transforms with the documented destinations (Notes/Journal/... for Daily notes and Notes/... for Notes) and adapting the two inline-body migration cases to the crate's StandaloneNote and LogEntry types.

Finding/correction: the earlier parity table marked the 14 pure legacy path and Log-link rewrite tests as out of scope. That was incorrect: docs/DESIGN.md §17 says calternal.js imports translate lowercase paths. I am porting the pure transforms with the documented destinations (`Notes/Journal/...` for Daily notes and `Notes/...` for Notes) and adapting the two inline-body migration cases to the crate's `StandaloneNote` and `LogEntry` types.
Author
Owner

Finished notes-core parity work on branch job/notes-parity.

Head: 5048e921df6c4492ef75909114c9feeb0ba9900e
Coverage: 398 reference tests considered; 387 ported; 11 not ported. The remaining cases are 7 sync frontmatter conflict-merge tests and 4 SQLite/filesystem indexer integration tests.

Gates (verbatim output):

CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 cargo fmt --check
[exit 0; no output]

CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 cargo clippy --all-targets -- -D warnings
    Checking calternal-notes-core v0.1.0 (/home/kayg/Developer/calternal-wt/notes-parity/crates/calternal-notes-core)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.01s

CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 cargo test -p calternal-notes-core
running 353 tests
test result: ok. 353 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.14s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Cargo clean output: Removed 3686 files, 1.2GiB total.

Decision to confirm: the job asks for calternal-events after slug, but the current DESIGN.md managed-key list omits it. The implementation follows the job instruction. The import path tests map legacy journal/YYYYMMDD-dailynote.md to Notes/Journal/... and other legacy journal/ Notes to Notes/..., based on the documented capitalized layout.

Finished notes-core parity work on branch `job/notes-parity`. Head: `5048e921df6c4492ef75909114c9feeb0ba9900e` Coverage: 398 reference tests considered; 387 ported; 11 not ported. The remaining cases are 7 sync frontmatter conflict-merge tests and 4 SQLite/filesystem indexer integration tests. Gates (verbatim output): CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 cargo fmt --check [exit 0; no output] CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 cargo clippy --all-targets -- -D warnings Checking calternal-notes-core v0.1.0 (/home/kayg/Developer/calternal-wt/notes-parity/crates/calternal-notes-core) Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.01s CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 cargo test -p calternal-notes-core running 353 tests test result: ok. 353 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.14s running 11 tests test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Cargo clean output: `Removed 3686 files, 1.2GiB total`. Decision to confirm: the job asks for `calternal-events` after `slug`, but the current DESIGN.md managed-key list omits it. The implementation follows the job instruction. The import path tests map legacy `journal/YYYYMMDD-dailynote.md` to `Notes/Journal/...` and other legacy `journal/` Notes to `Notes/...`, based on the documented capitalized layout.
Author
Owner

Hygiene review: the Notes core changes are in dev, but the final report still asks the owner to confirm whether calternal-events is a managed key. Keeping #8 open for that design decision.

Hygiene review: the Notes core changes are in dev, but the final report still asks the owner to confirm whether `calternal-events` is a managed key. Keeping #8 open for that design decision.
Author
Owner

Rechecked against origin/dev at d4e7188810. The managed-key decision for calternal-events is now recorded in docs/DESIGN.md §17. crates/calternal-notes-core/PARITY.md still reports 387/398 reference tests ported and names 11 remaining cases: seven sync frontmatter conflict-merge cases and four SQLite/filesystem indexer integration cases. Keeping #8 open for those parity gaps.

Rechecked against origin/dev at d4e7188810a89fb0e8e6b162279917f7e23989f9. The managed-key decision for calternal-events is now recorded in docs/DESIGN.md §17. crates/calternal-notes-core/PARITY.md still reports 387/398 reference tests ported and names 11 remaining cases: seven sync frontmatter conflict-merge cases and four SQLite/filesystem indexer integration cases. Keeping #8 open for those parity gaps.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#8
No description provided.