You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add PG extension build, server-auth, and infra updates
Add end-to-end support for building and publishing the pg_kalam PostgreSQL extension: two GitHub Actions jobs to build extension artifacts for x86_64 and aarch64, package/install scripts, and a docker_pg job to build/push multi-arch PG images. Introduce the pg/ workspace files, tests, Dockerfiles and packaging helpers. Add a new backend crate (kalamdb-server-auth) and make auth crate HTTP integration opt-in; update workspace members and dependencies (including tokio-postgres) and add a compact release profile (release-pg) for smaller extension .so builds. Update backend defaults to enable jemalloc and tweak auth features. Also improve docs/instructions (AGENTS.md and .github/copilot-instructions.md) with performance reminders and workflow tweaks, and apply various repo-wide code/dependency adjustments.
echo "::warning::Docker image publish succeeded, but Docker Hub README update failed. Ensure DOCKERHUB_USERNAME is a repo admin and DOCKERHUB_TOKEN has read/write/delete scope."
Copy file name to clipboardExpand all lines: AGENTS.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,13 +36,16 @@ use kalamdb_commons::models::UserId;
36
36
14.**Tracing Table Field Convention**: In spans/events, log `table_id` (format `namespace.table`) instead of separate `table_namespace` and `table_name` fields.
37
37
15.**No SQL Rewrite in Hot Paths**: Do not add SQL/DML/SELECT rewrite passes in execution hot paths. Prefer type-safe coercion at typed boundaries (parameter binding, scalar coercion, provider write path, DataFusion-native casts/UDFs explicitly invoked by query authors) to avoid extra parse/transform overhead.
38
38
16.**SDK Changes Must Update Docs**: Any change under `link/sdks/**` or SDK bridge crates (for example `link/kalam-link-dart/**`) must also update the corresponding SDK docs in the `KalamSite` repo (typically `../KalamSite/content/sdk/**`) and include appropriate test coverage.
39
+
17.**Performance-First Execution**: Prefer approaches that reduce runtime, allocations, binary size, and compile time; avoid adding abstractions or dependencies that materially slow hot paths or build/test feedback loops without a clear benefit.
40
+
18.**Performance Test Timing**: Whenever you run performance tests, benchmarks, or perf-focused e2e cases, record and report how long each relevant test took in seconds.
39
41
40
42
> **⚠️ IMPORTANT**: Smoke tests require a running KalamDB server! Start the server first with `cargo run` in the `backend` directory before running smoke tests. The tests will fail if no server is running.
41
43
42
44
**When adding a new dependency:**
43
45
1. Add it to `Cargo.toml` (root) under `[workspace.dependencies]` with version
44
46
2. Reference it in individual crates using `{ workspace = true }`
45
47
3. Add crate-specific features if needed: `{ workspace = true, features = ["..."] }`
48
+
4. Enable only the features that are actually required; prefer `default-features = false` when defaults pull in unused code or slow compilation.
46
49
47
50
**To update a dependency version:**
48
51
- Only edit the version in root `Cargo.toml`
@@ -72,6 +75,22 @@ use kalamdb_commons::models::UserId;
72
75
-**Actix-Web Middleware**: Custom authentication extractors and guards
- Parse and address all errors/warnings in one pass; avoid running `cargo check` repeatedly after each tiny edit.
128
+
- If a task requires multiple related code changes, finish the full edit batch first and only then run `cargo check` or `cargo build` when validation is actually needed.
109
129
- Re-run `cargo check` only after a meaningful batch of fixes. This keeps feedback fast and focused, and prevents thrashing CI and local builds.
110
130
111
131
## Testing (MUST)
112
132
113
133
- Use `cargo nextest run` for all test executions unless explicitly told otherwise.
114
134
- For CLI e2e tests: run `cargo nextest run --features e2e-tests`**without**`--no-fail-fast`, capture output to a file, then fix failures one-by-one by running only the failing test(s). Re-run the full suite after fixes.
115
135
- For e2e test runs, do NOT pass `--no-fail-fast`. Run normally, fix the first failure, re-run until it passes, then move to the next failing issue.
136
+
- For performance-focused tests, benchmarks, and perf e2e cases, capture and report the runtime for each relevant test in seconds in the final update.
116
137
- Always add `#[ntest::timeout(time)]` to every async test where `time` is the **actual observed runtime** × 1.5 (to cover slower machines).
117
138
- Example: if a test took 40s, set `#[ntest::timeout(60000)]`.
118
139
- Recalculate and update timeouts after significant changes to test behavior or data size.
0 commit comments