Core: wire auth, db, fs and instance config into the server #11

Closed
opened 2026-09-24 08:56:02 +00:00 by kayg · 11 comments
Owner

Codex job server-wire.

Base: 490227b5ae

Codex job `server-wire`. Base: 490227b5aeeb1b6a1fb62b89427f23e5be3c3425
Author
Owner

Starting job/server-wire at base 490227b5ae. Reading server, auth, db, fs and plugin APIs before integration.

Starting job/server-wire at base 490227b5aeeb1b6a1fb62b89427f23e5be3c3425. Reading server, auth, db, fs and plugin APIs before integration.
Author
Owner

Finding: calternal-fs rejects .system through public RelPath, while calternal-db opens SQLite and snapshots by filesystem path. The server needs a narrow calternal-fs API to create/open the reserved system directory safely, then pass a handle-derived path to db. Auth migrations currently run only inside SqliteAuthStore::connect; startup must register their SQL in calternal-db and construct the auth store from the migrated pool.

Finding: calternal-fs rejects `.system` through public RelPath, while calternal-db opens SQLite and snapshots by filesystem path. The server needs a narrow calternal-fs API to create/open the reserved system directory safely, then pass a handle-derived path to db. Auth migrations currently run only inside SqliteAuthStore::connect; startup must register their SQL in calternal-db and construct the auth store from the migrated pool.
Author
Owner

Blocked by the job's file ownership rule. Integrating the required calternal-auth, calternal-db, calternal-fs and notify dependencies into calternal-server causes Cargo to update workspace Cargo.lock, which is outside the owned paths. Cargo.lock must be assigned to this job (or another writer must provide the lockfile update) before the changes can be committed or the staleness gate run. I stopped on this boundary. Current branch is job/server-wire at base 490227b5ae; the working tree has an uncommitted integration draft. No secrets, push, deploy, merge, or issue close occurred.

Blocked by the job's file ownership rule. Integrating the required calternal-auth, calternal-db, calternal-fs and notify dependencies into calternal-server causes Cargo to update workspace Cargo.lock, which is outside the owned paths. Cargo.lock must be assigned to this job (or another writer must provide the lockfile update) before the changes can be committed or the staleness gate run. I stopped on this boundary. Current branch is job/server-wire at base 490227b5aeeb1b6a1fb62b89427f23e5be3c3425; the working tree has an uncommitted integration draft. No secrets, push, deploy, merge, or issue close occurred.
Author
Owner

Continuing job/server-wire from base 490227b5ae. The uncommitted draft is in this worktree. I am reviewing it against the crate APIs, then will complete wiring, verify gates, and commit.

Continuing job/server-wire from base 490227b5aeeb1b6a1fb62b89427f23e5be3c3425. The uncommitted draft is in this worktree. I am reviewing it against the crate APIs, then will complete wiring, verify gates, and commit.
Author
Owner

Review finding: the draft mounts auth routes under /api/v1, shares the auth session resolver with plugin request context, opens .system through calternal-fs, and registers auth SQL with calternal-db migrations. The original config.example.toml still contained instance_name as a bootstrap value, so I replaced it with an o2 env example and documented the trusted proxy range. I am checking provider hot reload, backup path handling, and compilation now.

Review finding: the draft mounts auth routes under /api/v1, shares the auth session resolver with plugin request context, opens .system through calternal-fs, and registers auth SQL with calternal-db migrations. The original config.example.toml still contained instance_name as a bootstrap value, so I replaced it with an o2 env example and documented the trusted proxy range. I am checking provider hot reload, backup path handling, and compilation now.
Author
Owner

Finding and change: OIDC providers were fixed in AuthState at startup, so a valid config edit could change the file without changing login behavior. I added an atomic provider-map replacement in calternal-auth and wired config reload to rediscover providers before applying them. I also registered plugin job hooks with the durable worker, added a writable probe through calternal-fs for /readyz, and documented the held .system directory handle used by SQLite and snapshots. An in-process full-app test now exercises setup registration, login cookie, plugin access, data-only bearer denial on auth routes, config reload, home creation, and backup.

Finding and change: OIDC providers were fixed in AuthState at startup, so a valid config edit could change the file without changing login behavior. I added an atomic provider-map replacement in calternal-auth and wired config reload to rediscover providers before applying them. I also registered plugin job hooks with the durable worker, added a writable probe through calternal-fs for /readyz, and documented the held .system directory handle used by SQLite and snapshots. An in-process full-app test now exercises setup registration, login cookie, plugin access, data-only bearer denial on auth routes, config reload, home creation, and backup.
Author
Owner

Verification finding: the new in-process server test passes. It exercised first-owner WebAuthn registration with SoftPasskey, login cookie access to the system plugin, rejection of a data-only agent bearer on an auth route, valid config hot reload and invalid TOML rejection, idempotent home folder creation, a SQLite backup trigger, and /readyz. I also corrected the merged auth OpenAPI paths to include their /api/v1 mount prefix.

Verification finding: the new in-process server test passes. It exercised first-owner WebAuthn registration with SoftPasskey, login cookie access to the system plugin, rejection of a data-only agent bearer on an auth route, valid config hot reload and invalid TOML rejection, idempotent home folder creation, a SQLite backup trigger, and /readyz. I also corrected the merged auth OpenAPI paths to include their /api/v1 mount prefix.
Author
Owner

Finding and decision for owner review: default_quota in the instance file had no effect on calternal-fs. I now apply it when homes are created and after config reload. I interpret default_quota = 0 as unlimited and added the smallest public calternal-fs clear_quota method so a reload can remove a previous limit. The design names a default quota but does not define the zero value or how existing homes should change. The live instance name also now updates /api/v1/system/info after reload.

Finding and decision for owner review: default_quota in the instance file had no effect on calternal-fs. I now apply it when homes are created and after config reload. I interpret default_quota = 0 as unlimited and added the smallest public calternal-fs clear_quota method so a reload can remove a previous limit. The design names a default quota but does not define the zero value or how existing homes should change. The live instance name also now updates /api/v1/system/info after reload.
Author
Owner

Finding: the existing /api/v1/auth/settings/signup route was a second writer for open_signup and could diverge from config.toml. Server middleware now handles that route through the same atomic instance-file write path and requires its fresh admin session. The full-app test checks this. I also updated deploy/deploy-o2.sh so a newly created o2 env file includes public URL and trusted proxies; existing env files must be edited as documented in deploy/o2/README.md. Root README.md still describes the old config.toml bootstrap path, but it is outside this job's owned files.

Finding: the existing /api/v1/auth/settings/signup route was a second writer for open_signup and could diverge from config.toml. Server middleware now handles that route through the same atomic instance-file write path and requires its fresh admin session. The full-app test checks this. I also updated deploy/deploy-o2.sh so a newly created o2 env file includes public URL and trusted proxies; existing env files must be edited as documented in deploy/o2/README.md. Root README.md still describes the old config.toml bootstrap path, but it is outside this job's owned files.
Author
Owner

Finished job/server-wire. Head: 21f9804446

Built: startup through calternal-fs Root, journal recovery, shared Index migrations, auth and plugin context, typed atomic instance config with hot reload, OIDC provider refresh, home creation and quota application, backup worker/cron/admin routes, health/readiness, Apple association, OpenAPI and TS client. Added an in-process full-app passkey/session/config/backup test.

Decisions for owner: default_quota = 0 means unlimited; config default changes apply to existing homes. An absent data directory is an error; the deployment creates it.

Known gap: root README.md still describes config.toml as a bootstrap source. It is outside this job's owned files. Existing o2 env files need PUBLIC_URL and TRUSTED_PROXIES added manually; deploy/o2/README.md documents the values. No deploy was performed.

Gate output (verbatim):

$ cargo fmt --check

$ cargo clippy --all-targets -- -D warnings

   Compiling calternal-server v0.0.1 (/home/kayg/Developer/calternal-wt/server-wire/crates/calternal-server)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.87s

$ cargo test

   Compiling calternal-server v0.0.1 (/home/kayg/Developer/calternal-wt/server-wire/crates/calternal-server)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 9.16s
     Running unittests src/lib.rs (target/debug/deps/calternal_api-004b681194b255d6)

running 1 test
test tests::error_envelope_serializes_the_stable_wrapper_and_code ... ok

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

     Running unittests src/lib.rs (target/debug/deps/calternal_auth-099efab90beed57e)

running 29 tests
test api::tests::forwarded_chain_uses_first_untrusted_hop_from_right ... ok
test oidc::tests::groups_authoritative_defaults_to_true_in_provider_config ... ok
test api::tests::agent_token_cannot_extract_account_authority ... ok
test api::tests::rate_limit_isolated_by_peer_ip ... ok
test api::tests::extractor_keeps_cookie_and_bearer_session_kinds_separate ... ok
test api::tests::authority_routes_require_recent_assertion_on_same_session ... ok
test store::tests::admin_reenrol_link_is_single_use ... ok
test store::tests::agent_token_has_data_scope_and_home_shares_limit ... ok
test store::tests::human_session_scopes_follow_role ... ok
test store::tests::migration_revokes_unclassified_pre_scope_sessions ... ok
test store::tests::oidc_cannot_claim_first_user_or_owner_role ... ok
test store::tests::oidc_reconcile_downgrades_and_preserves_owner ... ok
test store::tests::profile_role_and_disable_changes_take_effect ... ok
test oidc::tests::existing_identity_reconciles_groups_by_default ... ok
test oidc::tests::oidc_reauth_marks_only_initiating_session ... ok
test store::tests::revoke_all_keeps_only_current_and_requires_fresh_for_changes ... ok
test store::tests::role_and_disable_revoke_sessions_and_event_failure_rolls_back ... ok
test store::tests::sessions_are_kind_bound_and_revocable ... ok
test oidc::tests::non_authoritative_groups_only_set_initial_role ... ok
test store::tests::setup_is_single_use_under_concurrency ... ok
test store::tests::unlink_oidc_keeps_a_credential_and_rolls_back_on_audit_failure ... ok
test store::tests::username_is_case_insensitive_and_invite_single_use ... ok
test passkey::tests::setup_registration_then_simulated_usernameless_login ... ok
test store::tests::recovery_code_is_one_time ... ok
test passkey::tests::existing_registration_fails_after_initiating_session_revoked ... ok
test store::tests::sessions_expire_at_idle_and_absolute_deadlines ... ok
test store::tests::recovery_proof_is_checked_before_challenge ... ok
test oidc::tests::groups_claim_maps_admin_and_guest ... ok
test oidc::tests::validates_nonce_audience_expiry_and_refreshes_rotated_key ... ok

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

     Running unittests src/lib.rs (target/debug/deps/calternal_db-eac9411a0cb357d9)

running 0 tests

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

     Running tests/queue.rs (target/debug/deps/queue-186790d25e31e675)

running 9 tests
test enqueue_lease_throughput_microbenchmark ... ignored, manual enqueue plus lease throughput measurement
test cron_enqueues_each_occurrence_once_and_keeps_one_active_job ... ok
test deduplicates_pending_and_leased_jobs ... ok
test opens_wal_database_with_required_pragmas ... ok
test plugin_migrations_share_namespaces_and_check_applied_sql ... ok
test expired_lease_is_recovered_and_old_owner_loses_lease ... ok
test failure_backoff_uses_fake_clock_and_dead_letters_at_limit ... ok
test snapshot_restores_as_a_readable_database ... ok
test workers_do_not_execute_a_job_twice ... ok

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

     Running unittests src/lib.rs (target/debug/deps/calternal_fs-9f88739ca99b58fd)

running 9 tests
test tests::thinning_keeps_every_version_in_first_day ... ok
test tests::relative_paths_reject_ambiguous_components ... ok
test tests::write_future_can_run_on_server_workers ... ok
test tests::recovery_discards_uncommitted_intent_file ... ok
test tests::recovery_replaces_poisoned_blob_at_each_step ... ok
test tests::recovery_replays_overwrites_with_versions ... ok
test tests::recovery_replays_each_move_trash_restore_and_install_step ... ok
test tests::gc_waits_for_in_flight_blob_link_across_roots ... ok
test tests::gc_waits_for_dedup_copy_after_source_unlink ... ok

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

     Running tests/storage.rs (target/debug/deps/storage-9d8afb992fa815da)

running 27 tests
test copied_file_is_read_only_with_reflink_preference ... ok
test configured_quota_covers_copy_and_cross_home_move ... ok
test copy_of_deduped_file_reuses_blob ... ok
test directory_pages_advance_with_cursor ... ok
test dedup_concurrent_writes ... ok
test cross_home_folder_move_checks_all_file_bytes ... ok
test mirrored_versions_follow_directory_and_delete ... ok
test moving_file_carries_versions ... ok
test orphan_blobs_are_collected ... ok
test public_listing_hides_reserved_names ... ok
test reserved_internals_are_not_public_paths ... ok
test overwriting_move_carries_source_versions_and_preserves_target ... ok
test quota_is_shared_and_override_only_lowers ... ok
test percent_name_survives_trash_round_trip ... ok
test thinning_keeps_recent_and_bucket_representatives ... ok
test symlink_parent_is_never_followed ... ok
test overwriting_with_copy_or_move_keeps_destination_version ... ok
test traversal_is_rejected ... ok
test existing_blob_with_wrong_bytes_is_replaced ... ok
test replace_does_not_modify_another_hardlink ... ok
test trash_round_trip_and_quota ... ok
test version_counts_against_quota ... ok
test zero_byte_file_gets_version_and_thins ... ok
test trash_restores_versions_without_mixing_new_file ... ok
test trash_collisions_get_distinct_names_and_empty ... ok
test arbitrary_paths_never_escape ... ok
test symlink_swap_race_never_writes_outside ... ok

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

     Running unittests src/lib.rs (target/debug/deps/calternal_notes_core-e5fe3118beb81232)

running 37 tests
test composer::tests::defaults_time_from_the_passed_clock_without_reading_system_time ... ok
test composer::tests::parses_leading_time_ranges_and_namespaces_event_tags ... ok
test composer::tests::ports_reference_compact_and_title_first_time_vectors ... ok
test composer::tests::preserves_connecting_words_around_an_activity_phrase ... ok
test composer::tests::understands_meridiem_and_bare_hour_ranges ... ok
test composer::tests::removes_only_the_consumed_at_connector ... ok
test dayfile::tests::appended_log_entry_keeps_the_supplied_attachment_sub_block ... ok
test dayfile::tests::builds_reference_daily_note_with_capital_paths ... ok
test dayfile::tests::canonical_log_writer_retains_the_legacy_link_form_when_requested ... ok
test dayfile::tests::appending_after_a_final_bullet_without_newline_separates_the_entries ... ok
test dayfile::tests::editing_final_bullet_keeps_its_no_final_newline ... ok
test dayfile::tests::parses_moment_and_range_bullets ... ok
test frontmatter::tests::prose_between_card_breaks_is_not_frontmatter ... ok
test dayfile::tests::editing_helpers_splice_only_the_target_entry ... ok
test dayfile::tests::parses_log_entry_and_child_attachment_without_rewriting_unknown_lines ... ok
test dayfile::tests::reads_legacy_title_links_and_only_projects_valid_child_attachments ... ok
test frontmatter::tests::writer_orders_tiers_and_preserves_custom_keys_and_body ... ok
test frontmatter::tests::meta_reads_quoted_flow_and_block_tags ... ok
test frontmatter::tests::yaml_safety_round_trips_newlines_quotes_and_controls ... ok
test identity::tests::filename_keeps_identity_slice_and_uses_capital_folder ... ok
test frontmatter::tests::yaml_safety_vectors_keep_scalars_and_flow_items_intact ... ok
test frontmatter::tests::event_links_are_quoted_markdown_with_canonical_angle_targets ... ok
test identity::tests::injected_random_source_mints_canonical_v4_uuid ... ok
test links::tests::escaped_wikilinks_are_literal_but_plain_wikilinks_scan ... ok
test identity::tests::id_slice_skips_separators_and_folds_case ... ok
test links::tests::inline_and_frontmatter_tags_form_a_deduplicated_union ... ok
test links::tests::rewrite_changes_only_destination_bytes_for_canonical_and_relative_forms ... ok
test identity::tests::slugify_matches_reference_vectors ... ok
test links::tests::scans_links_embeds_nested_tags_and_block_ids_outside_code ... ok
test links::tests::relative_resolution_normalizes_parent_segments_and_keeps_anchor ... ok
test links::tests::wikilink_conversion_keeps_heading_refs_and_table_aliases_literal ... ok
test links::tests::wikilink_identity_slice_disambiguates_the_candidate_path ... ok
test rename::tests::malformed_filename_fails_before_building_a_plan ... ok
test links::tests::wikilink_conversion_requires_one_match_and_keeps_escaped_text ... ok
test frontmatter::tests::yaml_regressions_parse_as_strings_in_an_independent_yaml_reader ... ok
test rename::tests::rename_converts_resolved_title_wikilinks_to_relative_markdown_links ... ok
test rename::tests::rename_keeps_date_idslice_and_only_edits_link_destinations ... ok

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

     Running tests/vector_parity.rs (target/debug/deps/vector_parity-a96f4753ce94b509)

running 5 tests
test frontmatter_json_vectors_match_reference_tests ... ok
test dayfile_json_vectors_match_reference_tests ... ok
test identity_json_vectors_match_reference_tests ... ok
test link_json_vectors_match_reference_tests ... ok
test composer_json_vectors_match_reference_tests ... ok

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

     Running unittests src/lib.rs (target/debug/deps/calternal_plugin-c2b972c0c1ab07a7)

running 4 tests
test tests::enablement_applies_instance_and_user_overrides ... ok
test tests::registry_orders_plugins_by_id ... ok
test tests::plugin_routes_enforce_manifest_scopes_from_server_context ... ok
test tests::enabled_plugin_router_is_mounted_under_its_api_prefix ... ok

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

     Running unittests src/main.rs (target/debug/deps/calternal_server-1f968a903d4c9767)

running 6 tests
test tests::missing_search_query_uses_error_envelope ... ok
test tests::search_provider_receives_authenticated_permission_context ... ok
test tests::reference_system_plugin_returns_instance_info ... ok
test tests::openapi_contains_reference_plugin_and_search_paths ... ok
test tests::search_fanout_returns_fast_results_before_slow_provider_deadline ... ok
test wire::tests::full_app_setup_session_config_and_backup ... ok

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

   Doc-tests calternal_api

running 0 tests

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

   Doc-tests calternal_auth

running 0 tests

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

   Doc-tests calternal_db

running 0 tests

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

   Doc-tests calternal_fs

running 0 tests

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

   Doc-tests calternal_notes_core

running 0 tests

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

   Doc-tests calternal_plugin

running 0 tests

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

$ bash packages/api-client/check-generated.sh

   Compiling calternal-server v0.0.1 (/home/kayg/Developer/calternal-wt/server-wire/crates/calternal-server)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.11s
     Running `target/debug/calternal-server openapi`
$ bunx --package openapi-typescript@7.13.0 openapi-typescript ../../contracts/openapi.json -o src/generated.ts
✨ openapi-typescript 7.13.0
🚀 ../../contracts/openapi.json → src/generated.ts [115.8ms]

$ bun run check (apps/web)

$ svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/server-wire/apps/web
Getting Svelte diagnostics...

svelte-check found 0 errors and 0 warnings

$ bun run test (apps/web)

$ vitest run

 RUN  v5.0.1 /home/kayg/Developer/calternal-wt/server-wire/apps/web


 Test Files  1 passed (1)
      Tests  1 passed (1)
   Start at  11:19:09
   Duration  276ms (transform 46%, import 39%, tests 8%, worker 6%)

Finished job/server-wire. Head: 21f980444610eb723cb728434a4d78d52aa8720a Built: startup through calternal-fs Root, journal recovery, shared Index migrations, auth and plugin context, typed atomic instance config with hot reload, OIDC provider refresh, home creation and quota application, backup worker/cron/admin routes, health/readiness, Apple association, OpenAPI and TS client. Added an in-process full-app passkey/session/config/backup test. Decisions for owner: default_quota = 0 means unlimited; config default changes apply to existing homes. An absent data directory is an error; the deployment creates it. Known gap: root README.md still describes config.toml as a bootstrap source. It is outside this job's owned files. Existing o2 env files need PUBLIC_URL and TRUSTED_PROXIES added manually; deploy/o2/README.md documents the values. No deploy was performed. Gate output (verbatim): $ cargo fmt --check ``` ``` $ cargo clippy --all-targets -- -D warnings ``` Compiling calternal-server v0.0.1 (/home/kayg/Developer/calternal-wt/server-wire/crates/calternal-server) Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.87s ``` $ cargo test ``` Compiling calternal-server v0.0.1 (/home/kayg/Developer/calternal-wt/server-wire/crates/calternal-server) Finished `test` profile [unoptimized + debuginfo] target(s) in 9.16s Running unittests src/lib.rs (target/debug/deps/calternal_api-004b681194b255d6) running 1 test test tests::error_envelope_serializes_the_stable_wrapper_and_code ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/calternal_auth-099efab90beed57e) running 29 tests test api::tests::forwarded_chain_uses_first_untrusted_hop_from_right ... ok test oidc::tests::groups_authoritative_defaults_to_true_in_provider_config ... ok test api::tests::agent_token_cannot_extract_account_authority ... ok test api::tests::rate_limit_isolated_by_peer_ip ... ok test api::tests::extractor_keeps_cookie_and_bearer_session_kinds_separate ... ok test api::tests::authority_routes_require_recent_assertion_on_same_session ... ok test store::tests::admin_reenrol_link_is_single_use ... ok test store::tests::agent_token_has_data_scope_and_home_shares_limit ... ok test store::tests::human_session_scopes_follow_role ... ok test store::tests::migration_revokes_unclassified_pre_scope_sessions ... ok test store::tests::oidc_cannot_claim_first_user_or_owner_role ... ok test store::tests::oidc_reconcile_downgrades_and_preserves_owner ... ok test store::tests::profile_role_and_disable_changes_take_effect ... ok test oidc::tests::existing_identity_reconciles_groups_by_default ... ok test oidc::tests::oidc_reauth_marks_only_initiating_session ... ok test store::tests::revoke_all_keeps_only_current_and_requires_fresh_for_changes ... ok test store::tests::role_and_disable_revoke_sessions_and_event_failure_rolls_back ... ok test store::tests::sessions_are_kind_bound_and_revocable ... ok test oidc::tests::non_authoritative_groups_only_set_initial_role ... ok test store::tests::setup_is_single_use_under_concurrency ... ok test store::tests::unlink_oidc_keeps_a_credential_and_rolls_back_on_audit_failure ... ok test store::tests::username_is_case_insensitive_and_invite_single_use ... ok test passkey::tests::setup_registration_then_simulated_usernameless_login ... ok test store::tests::recovery_code_is_one_time ... ok test passkey::tests::existing_registration_fails_after_initiating_session_revoked ... ok test store::tests::sessions_expire_at_idle_and_absolute_deadlines ... ok test store::tests::recovery_proof_is_checked_before_challenge ... ok test oidc::tests::groups_claim_maps_admin_and_guest ... ok test oidc::tests::validates_nonce_audience_expiry_and_refreshes_rotated_key ... ok test result: ok. 29 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 29.42s Running unittests src/lib.rs (target/debug/deps/calternal_db-eac9411a0cb357d9) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/queue.rs (target/debug/deps/queue-186790d25e31e675) running 9 tests test enqueue_lease_throughput_microbenchmark ... ignored, manual enqueue plus lease throughput measurement test cron_enqueues_each_occurrence_once_and_keeps_one_active_job ... ok test deduplicates_pending_and_leased_jobs ... ok test opens_wal_database_with_required_pragmas ... ok test plugin_migrations_share_namespaces_and_check_applied_sql ... ok test expired_lease_is_recovered_and_old_owner_loses_lease ... ok test failure_backoff_uses_fake_clock_and_dead_letters_at_limit ... ok test snapshot_restores_as_a_readable_database ... ok test workers_do_not_execute_a_job_twice ... ok test result: ok. 8 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.12s Running unittests src/lib.rs (target/debug/deps/calternal_fs-9f88739ca99b58fd) running 9 tests test tests::thinning_keeps_every_version_in_first_day ... ok test tests::relative_paths_reject_ambiguous_components ... ok test tests::write_future_can_run_on_server_workers ... ok test tests::recovery_discards_uncommitted_intent_file ... ok test tests::recovery_replaces_poisoned_blob_at_each_step ... ok test tests::recovery_replays_overwrites_with_versions ... ok test tests::recovery_replays_each_move_trash_restore_and_install_step ... ok test tests::gc_waits_for_in_flight_blob_link_across_roots ... ok test tests::gc_waits_for_dedup_copy_after_source_unlink ... ok test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s Running tests/storage.rs (target/debug/deps/storage-9d8afb992fa815da) running 27 tests test copied_file_is_read_only_with_reflink_preference ... ok test configured_quota_covers_copy_and_cross_home_move ... ok test copy_of_deduped_file_reuses_blob ... ok test directory_pages_advance_with_cursor ... ok test dedup_concurrent_writes ... ok test cross_home_folder_move_checks_all_file_bytes ... ok test mirrored_versions_follow_directory_and_delete ... ok test moving_file_carries_versions ... ok test orphan_blobs_are_collected ... ok test public_listing_hides_reserved_names ... ok test reserved_internals_are_not_public_paths ... ok test overwriting_move_carries_source_versions_and_preserves_target ... ok test quota_is_shared_and_override_only_lowers ... ok test percent_name_survives_trash_round_trip ... ok test thinning_keeps_recent_and_bucket_representatives ... ok test symlink_parent_is_never_followed ... ok test overwriting_with_copy_or_move_keeps_destination_version ... ok test traversal_is_rejected ... ok test existing_blob_with_wrong_bytes_is_replaced ... ok test replace_does_not_modify_another_hardlink ... ok test trash_round_trip_and_quota ... ok test version_counts_against_quota ... ok test zero_byte_file_gets_version_and_thins ... ok test trash_restores_versions_without_mixing_new_file ... ok test trash_collisions_get_distinct_names_and_empty ... ok test arbitrary_paths_never_escape ... ok test symlink_swap_race_never_writes_outside ... ok test result: ok. 27 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s Running unittests src/lib.rs (target/debug/deps/calternal_notes_core-e5fe3118beb81232) running 37 tests test composer::tests::defaults_time_from_the_passed_clock_without_reading_system_time ... ok test composer::tests::parses_leading_time_ranges_and_namespaces_event_tags ... ok test composer::tests::ports_reference_compact_and_title_first_time_vectors ... ok test composer::tests::preserves_connecting_words_around_an_activity_phrase ... ok test composer::tests::understands_meridiem_and_bare_hour_ranges ... ok test composer::tests::removes_only_the_consumed_at_connector ... ok test dayfile::tests::appended_log_entry_keeps_the_supplied_attachment_sub_block ... ok test dayfile::tests::builds_reference_daily_note_with_capital_paths ... ok test dayfile::tests::canonical_log_writer_retains_the_legacy_link_form_when_requested ... ok test dayfile::tests::appending_after_a_final_bullet_without_newline_separates_the_entries ... ok test dayfile::tests::editing_final_bullet_keeps_its_no_final_newline ... ok test dayfile::tests::parses_moment_and_range_bullets ... ok test frontmatter::tests::prose_between_card_breaks_is_not_frontmatter ... ok test dayfile::tests::editing_helpers_splice_only_the_target_entry ... ok test dayfile::tests::parses_log_entry_and_child_attachment_without_rewriting_unknown_lines ... ok test dayfile::tests::reads_legacy_title_links_and_only_projects_valid_child_attachments ... ok test frontmatter::tests::writer_orders_tiers_and_preserves_custom_keys_and_body ... ok test frontmatter::tests::meta_reads_quoted_flow_and_block_tags ... ok test frontmatter::tests::yaml_safety_round_trips_newlines_quotes_and_controls ... ok test identity::tests::filename_keeps_identity_slice_and_uses_capital_folder ... ok test frontmatter::tests::yaml_safety_vectors_keep_scalars_and_flow_items_intact ... ok test frontmatter::tests::event_links_are_quoted_markdown_with_canonical_angle_targets ... ok test identity::tests::injected_random_source_mints_canonical_v4_uuid ... ok test links::tests::escaped_wikilinks_are_literal_but_plain_wikilinks_scan ... ok test identity::tests::id_slice_skips_separators_and_folds_case ... ok test links::tests::inline_and_frontmatter_tags_form_a_deduplicated_union ... ok test links::tests::rewrite_changes_only_destination_bytes_for_canonical_and_relative_forms ... ok test identity::tests::slugify_matches_reference_vectors ... ok test links::tests::scans_links_embeds_nested_tags_and_block_ids_outside_code ... ok test links::tests::relative_resolution_normalizes_parent_segments_and_keeps_anchor ... ok test links::tests::wikilink_conversion_keeps_heading_refs_and_table_aliases_literal ... ok test links::tests::wikilink_identity_slice_disambiguates_the_candidate_path ... ok test rename::tests::malformed_filename_fails_before_building_a_plan ... ok test links::tests::wikilink_conversion_requires_one_match_and_keeps_escaped_text ... ok test frontmatter::tests::yaml_regressions_parse_as_strings_in_an_independent_yaml_reader ... ok test rename::tests::rename_converts_resolved_title_wikilinks_to_relative_markdown_links ... ok test rename::tests::rename_keeps_date_idslice_and_only_edits_link_destinations ... ok test result: ok. 37 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/vector_parity.rs (target/debug/deps/vector_parity-a96f4753ce94b509) running 5 tests test frontmatter_json_vectors_match_reference_tests ... ok test dayfile_json_vectors_match_reference_tests ... ok test identity_json_vectors_match_reference_tests ... ok test link_json_vectors_match_reference_tests ... ok test composer_json_vectors_match_reference_tests ... ok test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/calternal_plugin-c2b972c0c1ab07a7) running 4 tests test tests::enablement_applies_instance_and_user_overrides ... ok test tests::registry_orders_plugins_by_id ... ok test tests::plugin_routes_enforce_manifest_scopes_from_server_context ... ok test tests::enabled_plugin_router_is_mounted_under_its_api_prefix ... ok test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/main.rs (target/debug/deps/calternal_server-1f968a903d4c9767) running 6 tests test tests::missing_search_query_uses_error_envelope ... ok test tests::search_provider_receives_authenticated_permission_context ... ok test tests::reference_system_plugin_returns_instance_info ... ok test tests::openapi_contains_reference_plugin_and_search_paths ... ok test tests::search_fanout_returns_fast_results_before_slow_provider_deadline ... ok test wire::tests::full_app_setup_session_config_and_backup ... ok test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.75s Doc-tests calternal_api running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests calternal_auth running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests calternal_db running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests calternal_fs running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests calternal_notes_core running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests calternal_plugin running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` $ bash packages/api-client/check-generated.sh ``` Compiling calternal-server v0.0.1 (/home/kayg/Developer/calternal-wt/server-wire/crates/calternal-server) Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.11s Running `target/debug/calternal-server openapi` $ bunx --package openapi-typescript@7.13.0 openapi-typescript ../../contracts/openapi.json -o src/generated.ts ✨ openapi-typescript 7.13.0 🚀 ../../contracts/openapi.json → src/generated.ts [115.8ms] ``` $ bun run check (apps/web) ``` $ svelte-kit sync && svelte-check --tsconfig ./tsconfig.json Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/server-wire/apps/web Getting Svelte diagnostics... svelte-check found 0 errors and 0 warnings ``` $ bun run test (apps/web) ``` $ vitest run RUN v5.0.1 /home/kayg/Developer/calternal-wt/server-wire/apps/web Test Files 1 passed (1) Tests 1 passed (1) Start at 11:19:09 Duration 276ms (transform 46%, import 39%, tests 8%, worker 6%) ```
Author
Owner

Completed on dev in 3aea580f08 (Merge job/server-wire: auth, index, instance config, homes, backups wired into the server (#11)).

Completed on dev in 3aea580f0870123c6e5087f571ace48b9a922a37 (Merge job/server-wire: auth, index, instance config, homes, backups wired into the server (#11)).
kayg closed this issue 2026-10-01 05:08:25 +00:00
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#11
No description provided.