pond-db 0.16.2

Lossless storage and search for sessions from any AI agent client
language: rust

env:
  CARGO_TERM_COLOR: always

# Cargo commands run from this project root (packages/pond); the workspace
# lockfile, workspace manifest, and toolchain pin stay at the repo root,
# referenced workspace-relative with a leading '/'.
#
# Every file that changes the compiled output belongs here, or moon serves a
# cached result for a tree that would build differently: SKILL.md is embedded
# via include_str!, and the root manifest carries every [profile.*] (cargo
# honors profiles only at the workspace root).
fileGroups:
  sources:
    - 'src/**/*'
    - 'build.rs'
    - 'SKILL.md'
    - 'Cargo.toml'
    - '/Cargo.toml'
    - '/Cargo.lock'
    - '/rust-toolchain.toml'
    # The msvc rustflags (+crt-static) live here, and a moon fingerprint that
    # omits them lets a rustflags change be served from a cache entry built with
    # the old ones - lint-msvc and test-msvc are exactly the tasks that carry
    # them. kache's own keys already include the flags, so adding this costs one
    # moon run and no cold cache.
    - '/.cargo/config.toml'
  tests:
    - 'tests/**/*'
    - 'benches/**/*'

tasks:
  format:
    command: 'cargo fmt --check'
    inputs: ['@group(sources)', '@group(tests)']
  lint:
    command: 'cargo clippy --locked -- -D warnings'
    inputs: ['@group(sources)', '@group(tests)']
  test:
    command: 'cargo test --locked'
    inputs: ['@group(sources)', '@group(tests)']
  # The Windows leg. A separate task, not `test` run on a Windows runner:
  # moon's fingerprint carries no OS, so sharing one task would hit the hash
  # the Linux runner already cached and report "cached" without compiling
  # anything on Windows. The differing command is what keeps the two apart.
  # Same OS-fingerprint reasoning as test-msvc: `lint` runs on Linux and never
  # sees a cfg(windows) block, so Windows-only code was ungated until this task.
  lint-msvc:
    command: 'cargo clippy --locked --target x86_64-pc-windows-msvc --all-targets --features windows-launcher -- -D warnings'
    inputs: ['@group(sources)', '@group(tests)']
  test-msvc:
    # windows-launcher so pondw.exe is compiled here on every PR; the job that
    # builds it for the zip is release-gated, too late to learn it is broken.
    command: 'cargo test --locked --target x86_64-pc-windows-msvc --features windows-launcher'
    inputs: ['@group(sources)', '@group(tests)']
  # Cheap packaging gate: `cargo package --list` must contain every file the
  # code embeds via include_str!/include_bytes! (a full verify build is skipped
  # at publish time - publish_no_verify in .github/release-plz.toml). The script
  # cd's to this crate root itself, so it is cwd-independent.
  #
  # Takes the full sources group, not just src/ + SKILL.md: `cargo package
  # --list` resolves the graph, so it reads the manifests and the lockfile too.
  # Understating that let a stale Cargo.lock cache-hit this task while lint and
  # test - which do take the lockfile as input - failed on it.
  check-package:
    command: 'bash ../../ops/scripts/check-package-contents.sh'
    inputs: ['@group(sources)', '/ops/scripts/check-package-contents.sh']