Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .agents/documents/application/modules/async-workloads/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,16 @@ enum CacheError { StoreUnavailable, LockAlreadyHeld, TouchFailed }

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M4-CACHE-01 | Store | Todo | `Store` + `Repository` + moka + redis |
| F-M4-CACHE-02 | touch | Todo | `EXPIRE`/TTL reset without value fetch → `bool` |
| F-M4-CACHE-03 | Lock | Todo | `SET NX EX` + `block` retries + lease expiry |
| F-M4-CACHE-04 | Tests | Todo | touch extends/missing `false`, Lock contention, store isolation |
| F-M4-CACHE-01 | Store | Partial | `Store` + `Repository` + moka + redis |
| F-M4-CACHE-02 | touch | Done | `EXPIRE`/TTL reset without value fetch → `bool` |
| F-M4-CACHE-03 | Lock | Done | `SET NX EX` + `block` retries + lease expiry |
| F-M4-CACHE-04 | Tests | Partial | touch extends/missing `false`, Lock contention, store isolation |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M4-CACHE-01` — `Store`, `Repository`, and `CacheManager` are real; the memory store is a lock-guarded map, not `moka` (`crates/rustasea-cache/src/memory.rs:35`), and the Redis store works only behind the non-default `redis` feature.
> - `F-M4-CACHE-04` — the touch and lock-contention tests exist but are `#[ignore]`d and need the `redis` feature plus a live Redis (`crates/rustasea-cache/src/redis/tests.rs`); there are no memory-store touch or lock tests and no store-isolation test.

## 10. Cross-References
- API: [api-cache](../../api/async-workloads/api-cache.md)
Expand Down
14 changes: 10 additions & 4 deletions .agents/documents/application/modules/async-workloads/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,16 @@ struct UserCreated { id: u64 } // example app-level

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M4-EVT-01 | Event/Listener | Todo | `Event`+`Listener<E>` traits + `QUEUE` |
| F-M4-EVT-02 | Dispatcher | Todo | `dispatch` + `dispatchAfterResponse` buffered flush |
| F-M4-EVT-03 | Renames | Todo | `JobAttempted{exception}`/`QueueBusy{connectionName}` |
| F-M4-EVT-04 | Tests | Todo | async listener→Job, after-response spy, field names |
| F-M4-EVT-01 | Event/Listener | Done | `Event`+`Listener<E>` traits + `QUEUE` |
| F-M4-EVT-02 | Dispatcher | Partial | `dispatch` + `dispatchAfterResponse` buffered flush |
| F-M4-EVT-03 | Renames | Done | `JobAttempted{exception}`/`QueueBusy{connectionName}` |
| F-M4-EVT-04 | Tests | Partial | async listener→Job, after-response spy, field names |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M4-EVT-02` — `dispatch` is real; `dispatch_after_response` only pushes into `EventSink` and no non-test code drains it, so after-response listeners never run (`crates/rustasea-events/src/dispatcher.rs:254`).
> - `F-M4-EVT-04` — the async listener → job → worker path is tested (`crates/rustasea-events/tests/queued_listener.rs`); there is no after-response spy test and no field-name test for `JobAttempted`/`QueueBusy`.

## 10. Cross-References
- API: [api-events-schedule](../../api/async-workloads/api-events-schedule.md) — events section
Expand Down
16 changes: 11 additions & 5 deletions .agents/documents/application/modules/async-workloads/queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,17 @@ enum QueueError { DuplicateRoute{ type_name: &'static str }, UnknownConnection,

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M4-Q-01 | Job trait | Todo | `Job<T>` + `#[tries]`/`#[backoff]`/`#[timeout]` |
| F-M4-Q-02 | Queue::route | Todo | `OnceLock` registry + `DuplicateRoute` |
| F-M4-Q-03 | Drivers | Todo | `sync`/`database`/`redis` BRPOP + `dispatch`/`chain`/`batch` |
| F-M4-Q-04 | failed_jobs | Todo | dead-letter + `queue:failed`/`retry` |
| F-M4-Q-05 | Tests | Todo | chain stop, batch BatchId, duplicate route, retry backoff |
| F-M4-Q-01 | Job trait | Done | `Job<T>` + `#[tries]`/`#[backoff]`/`#[timeout]` |
| F-M4-Q-02 | Queue::route | Done | `OnceLock` registry + `DuplicateRoute` |
| F-M4-Q-03 | Drivers | Partial | `sync`/`database`/`redis` BRPOP + `dispatch`/`chain`/`batch` |
| F-M4-Q-04 | failed_jobs | Done | dead-letter + `queue:failed`/`retry` |
| F-M4-Q-05 | Tests | Partial | chain stop, batch BatchId, duplicate route, retry backoff |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M4-Q-03` — sync, database, and Redis drivers plus `dispatch` and `batch` are real (Redis behind the non-default `redis` feature); `Queue::chain` runs its jobs inline on the caller's task and never goes through a routed driver (`crates/rustasea-queue/src/registry.rs:175`).
> - `F-M4-Q-05` — retry backoff and the batch lifecycle are tested (`crates/rustasea-queue/tests/job_policy.rs`, `job_batches.rs`); there is no chain-stop test, no duplicate-route test, and no test of the `BatchId` returned by `Queue::batch`.

## 10. Cross-References
- API: [api-queue](../../api/async-workloads/api-queue.md)
Expand Down
18 changes: 13 additions & 5 deletions .agents/documents/application/modules/async-workloads/schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,19 @@ impl QueueRegistry {

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M4-SCH-01 | Schedule builder | Todo | `daily`/`cron`/`everyMinute`/`skipIfStillRunning`/`onOneServer` |
| F-M4-SCH-02 | Ticker | Todo | `schedule:run` 60s tick + `schedule:list` |
| F-M4-SCH-03 | Pause/Resume | Todo | flat cache/DB + `SchedulePaused`/`Resumed` events |
| F-M4-SCH-04 | Metrics | Todo | 4 metrics via `Queue` trait |
| F-M4-SCH-05 | Tests | Todo | pause→resume+skip+onOneServer+mid-exec+metrics |
| F-M4-SCH-01 | Schedule builder | Partial | `daily`/`cron`/`everyMinute`/`skipIfStillRunning`/`onOneServer` |
| F-M4-SCH-02 | Ticker | Partial | `schedule:run` 60s tick + `schedule:list` |
| F-M4-SCH-03 | Pause/Resume | Partial | flat cache/DB + `SchedulePaused`/`Resumed` events |
| F-M4-SCH-04 | Metrics | Done | 4 metrics via `Queue` trait |
| F-M4-SCH-05 | Tests | Partial | pause→resume+skip+onOneServer+mid-exec+metrics |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M4-SCH-01` — `daily`, `cron`, `every_minute`, and `skip_if_still_running` are real; `on_one_server` only sets a flag — its `lock_key` is computed but never read, so no distributed lock is taken (`crates/rustasea-schedule/src/command.rs:46`).
> - `F-M4-SCH-02` — `schedule:run` and `schedule:list` exist, but `schedule:run` runs one tick and exits (no 60s loop; `tick_interval` has no caller), and a due command cannot run: `dispatch_command` always returns `ScheduleError::Dispatch` because no queue dispatch path is wired (`crates/rustasea-schedule/src/scheduler.rs:146`).
> - `F-M4-SCH-03` — pause/resume flip a process-local `RwLock` and emit `SchedulePaused`/`ScheduleResumed`; the state is not stored in the cache or database (`crates/rustasea-schedule/src/pause.rs:28`), so a pause in one process does not reach another, and the emit fails with `Unhandled` when no listener is registered.
> - `F-M4-SCH-05` — only the queue metrics and schedule timezone handling are tested; there are no pause→resume, skip-if-running, onOneServer, or mid-execution tests.

## 10. Cross-References
- API: [api-events-schedule](../../api/async-workloads/api-events-schedule.md) — schedule section
Expand Down
14 changes: 10 additions & 4 deletions .agents/documents/application/modules/data-orm/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,16 @@ enum MigrationError { AlreadyApplied, Irreversible { name: String }, ExtensionMi

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M2-MIG-01 | Migration scaffold | Todo | `make:migration --create` + versioned filename + up/down |
| F-M2-MIG-02 | migrate CLI | Todo | `migrate` idempotent + `migrate:fresh --seed` |
| F-M2-MIG-03 | Seeder/Factory | Todo | `Seeder::run` + `Factory` sequence + `state` + `Str` reset |
| F-M2-MIG-04 | Tests | Todo | migration exists, factory reset, MissingTable |
| F-M2-MIG-01 | Migration scaffold | Partial | `make:migration --create` + versioned filename + up/down |
| F-M2-MIG-02 | migrate CLI | Done | `migrate` idempotent + `migrate:fresh --seed` |
| F-M2-MIG-03 | Seeder/Factory | Done | `Seeder::run` + `Factory` sequence + `state` + `Str` reset |
| F-M2-MIG-04 | Tests | Partial | migration exists, factory reset, MissingTable |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M2-MIG-01` — versioned filenames and `up` / `down` are real (`crates/rustasea-cli/src/generators/kinds/migration.rs:62`); there is no `--create=<table>` flag — the table is guessed from a `create_X_table` name and the template always emits `CREATE TABLE`.
> - `F-M2-MIG-04` — the generator output, the migration round trip, and the factory reset are tested; there is no missing-table test, and `OrmError::MissingTable` is never constructed outside tests (`crates/rustasea-orm/src/error.rs:41`).

## 10. Cross-References
- API: [api-query-builder](../../api/data-orm/api-query-builder.md) — migration CLI adjacency
Expand Down
15 changes: 11 additions & 4 deletions .agents/documents/application/modules/data-orm/model-relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,17 @@ enum ModelError { MissingPrimaryKey, RelationNotFound { name: String } }

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M2-MOD-01 | Derive macro | Todo | `id`/`timestamps`/`soft_delete`/table name/relations/serde |
| F-M2-MOD-02 | HasMany/BelongsTo | Todo | `with("posts")` eager load + `relation_loaded` |
| F-M2-MOD-03 | Soft delete | Todo | `deleted_at` partial index + `find(1)` without `withTrashed` → `None` |
| F-M2-MOD-04 | Tests | Todo | CRUD + serde round-trip (0/1/5) + depth cap |
| F-M2-MOD-01 | Derive macro | Partial | `id`/`timestamps`/`soft_delete`/table name/relations/serde |
| F-M2-MOD-02 | HasMany/BelongsTo | Done | `with("posts")` eager load + `relation_loaded` |
| F-M2-MOD-03 | Soft delete | Partial | `deleted_at` partial index + `find(1)` without `withTrashed` → `None` |
| F-M2-MOD-04 | Tests | Partial | CRUD + serde round-trip (0/1/5) + depth cap |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M2-MOD-01` — `#[derive(Model)]` handles the id, timestamps, soft deletes, and the table name (`crates/rustasea-macros/src/model.rs:178`); it cannot declare relations (a derived model has an empty `relations()` and callers pass `with_relations(...)` per query) and emits nothing for serde.
> - `F-M2-MOD-03` — the soft-delete global scope hides trashed rows (`crates/rustasea-orm/src/scopes.rs:72`); there is no `deleted_at` partial index (the schema builder has no partial-index DDL) and no `find` method.
> - `F-M2-MOD-04` — CRUD, soft delete, the depth cap, and a serde round trip with two related rows are tested; the 0/1/5 round-trip cases are not.

## 10. Cross-References
- Design: `architecture.md BC-2` · `domain.md BC-2` · `tdd.md BC-2` · `database.md §2 (users/posts)`
Expand Down
17 changes: 12 additions & 5 deletions .agents/documents/application/modules/data-orm/query-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,18 @@ struct UpsertResult { inserted: usize, updated: usize }

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M2-BLD-01 | Builder core | Todo | `where`/`orWhere`/`find`/`firstOrFail`/`paginate` |
| F-M2-BLD-02 | Additions | Todo | `chunkBy`/`insertOrIgnoreReturning`/`saveOrIgnore`/`refreshForUpdate`/`StraightJoin` |
| F-M2-BLD-03 | Upsert/Delete | Todo | strict `uniqueBy` + MySQL DELETE JOIN |
| F-M2-BLD-04 | Locks/Tx | Todo | `forUpdate`/`sharedLock` + `db.transaction` |
| F-M2-BLD-05 | Tests | Todo | chunk 10k, upsert empty, MySQL delete join snapshot |
| F-M2-BLD-01 | Builder core | Partial | `where`/`orWhere`/`find`/`firstOrFail`/`paginate` |
| F-M2-BLD-02 | Additions | Partial | `chunkBy`/`insertOrIgnoreReturning`/`saveOrIgnore`/`refreshForUpdate`/`StraightJoin` |
| F-M2-BLD-03 | Upsert/Delete | Done | strict `uniqueBy` + MySQL DELETE JOIN |
| F-M2-BLD-04 | Locks/Tx | Done | `forUpdate`/`sharedLock` + `db.transaction` |
| F-M2-BLD-05 | Tests | Partial | chunk 10k, upsert empty, MySQL delete join snapshot |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M2-BLD-01` — `where_eq` / `or_where_eq` / `where_op`, `first_or_fail`, and `paginate` are real; there is no `find` method — the equivalent is `Model::query().where_key(id).first(pool)`.
> - `F-M2-BLD-02` — `chunk_by` and `refresh_for_update` run queries; `insert_or_ignore_returning` and `save_or_ignore_sql` only return SQL text that nothing executes (`crates/rustasea-orm/src/model.rs:425`), and `straight_join` depends on the compile-time dialect, not the live pool.
> - `F-M2-BLD-05` — the empty `uniqueBy` case is tested; the 10k test covers the window helper rather than the query-running `chunk_by`, and there is no MySQL `DELETE JOIN` snapshot test (`delete_join_sql` is called by no test).

## 10. Cross-References
- API: [api-query-builder](../../api/data-orm/api-query-builder.md)
Expand Down
13 changes: 9 additions & 4 deletions .agents/documents/application/modules/data-orm/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,15 @@ enum VectorError { ExtensionMissing { extension: &'static str, hint: String }, V

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M2-VEC-01 | Blueprint | Todo | `vector(n)` + `dropVectorIndex` DDL |
| F-M2-VEC-02 | Builder | Todo | `whereVectorSimilarTo` dispatch + dimension guard |
| F-M2-VEC-03 | Migration guard | Todo | `has_extension("vector")` → typed error |
| F-M2-VEC-04 | Tests | Todo | nearest-10, extension missing, dim mismatch |
| F-M2-VEC-01 | Blueprint | Done | `vector(n)` + `dropVectorIndex` DDL |
| F-M2-VEC-02 | Builder | Done | `whereVectorSimilarTo` dispatch + dimension guard |
| F-M2-VEC-03 | Migration guard | Done | `has_extension("vector")` → typed error |
| F-M2-VEC-04 | Tests | Partial | nearest-10, extension missing, dim mismatch |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M2-VEC-04` — nearest-10 is checked as SQL text only (`crates/rustasea-orm/tests/vector.rs`); the live round trip uses k=2 and is skipped without `DATABASE_URL` + pgvector; the missing-extension case runs through SQLite, not a Postgres without pgvector.

## 10. Cross-References
- API: [api-query-builder](../../api/data-orm/api-query-builder.md) — vector section
Expand Down
15 changes: 11 additions & 4 deletions .agents/documents/application/modules/developer-platform/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,17 @@ trait Shutdownable { async fn shutdown(&self, handle: ShutdownHandle) -> Result<

| ID | Component | Status | Description |
|----|-----------|--------|-------------|
| F-M5-CLI-01 | CLI registry | Todo | `clap` derive + `list` + `#[usage]`/`#[help]`/`#[hidden]` |
| F-M5-CLI-02 | Prompts | Todo | `ask`/`secret`/`confirm`/`choice`/`multiSelect` + table/spinner |
| F-M5-CLI-03 | Artisan::call | Todo | in-process dispatch + `Shutdownable` |
| F-M5-CLI-04 | Tests | Todo | `list --json` entries, usage help, confirm abort, `did you mean?` |
| F-M5-CLI-01 | CLI registry | Partial | `clap` derive + `list` + `#[usage]`/`#[help]`/`#[hidden]` |
| F-M5-CLI-02 | Prompts | Done | `ask`/`secret`/`confirm`/`choice`/`multiSelect` + table/spinner |
| F-M5-CLI-03 | Artisan::call | Partial | in-process dispatch + `Shutdownable` |
| F-M5-CLI-04 | Tests | Partial | `list --json` entries, usage help, confirm abort, `did you mean?` |

> **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`.
>
> Open items:
> - `F-M5-CLI-01` — the clap-derive CLI, the registry, and `list` are real; `list` reads usage/help/hidden from the `Command` trait methods (`crates/rustasea-cli/src/artisan.rs:71`), and the `#[usage]` / `#[help]` / `#[hidden]` attribute macros emit constants the registry never reads.
> - `F-M5-CLI-03` — `Artisan::call` dispatches in-process (`crates/rustasea-cli/src/artisan.rs:107`); `Shutdownable` has no implementation outside tests and `queue:work` does not use it or `drain_with_timeout`.
> - `F-M5-CLI-04` — "did you mean?" and hidden filtering are tested; no test runs `list --json` and checks the entries, none covers usage/help output, and none covers aborting on `confirm`.

## 10. Cross-References
- API: [api-cli](../../api/developer-platform/api-cli.md)
Expand Down
Loading
Loading