Menu
AkurAI-Build
publicLatest change df12d49d3b4d5523258f3992e856462728218411 - structure: promote db/server/deploy into the library crate by Olafur Bui
# Bunfork contributor guidance ## Product boundary - Bunfork is a Linux-first Rust runtime for native MiniJinja pages and **prebuilt, verified static browser artifacts**. - Do not claim or add source/build/adapter/server-runtime compatibility with Bun, Node, Deno, V8, JavaScriptCore, RSC, Nitro, SvelteKit adapter-node, Next standalone, Vite SSR, or Nuxt/Nitro. Browser JavaScript belongs in admitted static artifacts and is served byte-for-byte. - Preserve the distinction between native and static modes: static serving must not open the database or load secrets. ## Security and data invariants - Treat artifact admission, manifests, path validation, hashing, preload-before-bind, route canonicalization, cache policy, and HTTP method handling as security-sensitive behavior. Fail closed; do not weaken limits or accept unknown manifest fields without tests and documentation. - Keep SQLCipher migrations embedded, ordered, transactional, and schema-validated. Never alter a production database directly or make destructive migration shortcuts. - Secrets stay in protected files or environment variables—never source, fixtures, documentation, logs, or command-line arguments. Maintain constant-time secret comparison. - Preserve bounded request bodies, concurrency, vector dimensions/results/work, and artifact file/count/size limits. New externally controllable work needs a documented bound and a regression test. ## Implementation and verification - Keep dependencies minimal and Rust code compatible with the repository lints; do not introduce `unsafe`, `unwrap`, debug macros, TODOs, or unimplemented paths. - Prefer focused changes. When other agents have uncommitted work, do not reformat, overwrite, or "fix" their files; coordinate and report blockers instead. - Run `cargo fmt --check` and the relevant tests. Before a release, run `cargo test --locked --all-targets --no-fail-fast`; do not deploy a failing tree. - Use `bunfork admit` and `bunfork doctor` for static artifacts. Deploy only via `bunfork deploy`; do not manually mutate a digest-owned release directory or bypass its ownership checks. ## Documentation discipline - Every code change must include the relevant documentation update in the same change. - Update the closest source of truth: `README.md` for user-facing contracts and commands, `docs/framework-e2e.md` for framework-artifact behavior, and `docs/adversarial/` for security-boundary evidence. - Keep documentation purposeful and concise: explain changed contracts, limits, or operations; do not restate implementation details or create redundant documents.