Skip to content

sync: develop -> main for v0.3.2 release - #437

Merged
ajianaz merged 3 commits into
mainfrom
sync-develop-to-main
Jun 22, 2026
Merged

ajianaz merged 3 commits into
mainfrom
sync-develop-to-main

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Sync develop to main for v0.3.2 tag + release.

Commits included:

Release workflow will be triggered by v0.3.2 tag after merge.

ajianaz and others added 3 commits June 22, 2026 06:52
#434)

Release checklist now explicitly lists ALL docs that must be updated
before tagging: README, CHANGELOG, cli-reference, configuration,
architecture, roadmap, hermes integration. No exceptions.

Also updated version to 0.3.1 and test count to 295.
* fix: harden schema migrations for partially-migrated databases

Three fixes for edge cases encountered during v0.2.0 → v0.3.1 upgrade:

1. migrate_v9_to_v10: add column_exists guards for source/source_type
   - Fresh v0.3.0 DBs already have these columns via SCHEMA constant
   - Running migration on such DBs crashed with 'duplicate column name'

2. migrate_v7_to_v8: make idx_memories_slug best-effort
   - Separated from memory_edges batch to prevent fatal error
   - Log at debug level if index creation fails (defensive)

3. SCHEMA source_type default: 'user' → 'unknown'
   - Consistent with migrate_v9_to_v10 default
   - Fresh DBs and migrated DBs now use the same source_type default

* refactor: keep slug index as hard error, separate from batch

CodeCora flagged that making idx_memories_slug best-effort could leave
databases without the index while reporting migration success.

Revert to hard error but separate from the memory_edges batch for
clearer error messages (separate error context: 'slug index' vs 'memory_edges').

The original production bug was in SCHEMA_INDEXES ordering (fixed in
develop), not in this migration itself.

* revert: restore source_type DEFAULT 'user' in SCHEMA

CodeCora flagged that changing the default affects existing databases
inconsistently — SQLite doesn't support ALTER DEFAULT, so old DBs
keep 'user' while new DBs would get 'unknown'.

The intentional difference is documented:
- SCHEMA DEFAULT 'user' — fresh DBs, code always sets source_type explicitly
- Migration DEFAULT 'unknown' — legacy rows without provenance info

This is the original behavior, now with column_exists guards as the
real fix for partially-migrated databases.

---------

Co-authored-by: ajianaz <[email protected]>
- Bump version 0.3.1 → 0.3.2 across all crates
- Add CHANGELOG entry for #435 (migration hardening) and #434 (docs checklist)
- Update AGENT.md version + schema version (v7 → v11)
- Update README badge + CLI reference version

Co-authored-by: ajianaz <[email protected]>
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

⚠️ Review could not complete. Cora produced an empty result. Check the workflow logs for errors.


Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit 629124d into main Jun 22, 2026
3 checks passed
@ajianaz
ajianaz deleted the sync-develop-to-main branch June 22, 2026 05:35
ajianaz added a commit that referenced this pull request Aug 13, 2026
* docs: add detailed documentation checklist to AGENT.md release process (#434)

Release checklist now explicitly lists ALL docs that must be updated
before tagging: README, CHANGELOG, cli-reference, configuration,
architecture, roadmap, hermes integration. No exceptions.

Also updated version to 0.3.1 and test count to 295.

* fix: harden schema migrations for partially-migrated databases (#435)

* fix: harden schema migrations for partially-migrated databases

Three fixes for edge cases encountered during v0.2.0 → v0.3.1 upgrade:

1. migrate_v9_to_v10: add column_exists guards for source/source_type
   - Fresh v0.3.0 DBs already have these columns via SCHEMA constant
   - Running migration on such DBs crashed with 'duplicate column name'

2. migrate_v7_to_v8: make idx_memories_slug best-effort
   - Separated from memory_edges batch to prevent fatal error
   - Log at debug level if index creation fails (defensive)

3. SCHEMA source_type default: 'user' → 'unknown'
   - Consistent with migrate_v9_to_v10 default
   - Fresh DBs and migrated DBs now use the same source_type default

* refactor: keep slug index as hard error, separate from batch

CodeCora flagged that making idx_memories_slug best-effort could leave
databases without the index while reporting migration success.

Revert to hard error but separate from the memory_edges batch for
clearer error messages (separate error context: 'slug index' vs 'memory_edges').

The original production bug was in SCHEMA_INDEXES ordering (fixed in
develop), not in this migration itself.

* revert: restore source_type DEFAULT 'user' in SCHEMA

CodeCora flagged that changing the default affects existing databases
inconsistently — SQLite doesn't support ALTER DEFAULT, so old DBs
keep 'user' while new DBs would get 'unknown'.

The intentional difference is documented:
- SCHEMA DEFAULT 'user' — fresh DBs, code always sets source_type explicitly
- Migration DEFAULT 'unknown' — legacy rows without provenance info

This is the original behavior, now with column_exists guards as the
real fix for partially-migrated databases.

---------

Co-authored-by: ajianaz <[email protected]>

* release: v0.3.2 — schema migration hardening (#436)

- Bump version 0.3.1 → 0.3.2 across all crates
- Add CHANGELOG entry for #435 (migration hardening) and #434 (docs checklist)
- Update AGENT.md version + schema version (v7 → v11)
- Update README badge + CLI reference version

Co-authored-by: ajianaz <[email protected]>

---------

Co-authored-by: ajianaz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant