Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5fbc5b0
chore(sqlx): commit regenerated SQLX cache files
Sinity Nov 12, 2025
7875c8f
fix(scripts): improve smart-check and smart-watch crate targeting
Sinity Nov 12, 2025
83ae67d
refactor(scripts): make bundle batching deterministic
Sinity Nov 12, 2025
a56cb02
feat(devshell): add interactive shell banner with Postgres health and…
Sinity Nov 12, 2025
cd464a5
chore(cargo): drop host-specific build tuning and add shared local Po…
Sinity Nov 12, 2025
31fa710
test(nextest): replace fixed CI thread count with `num-cpus` auto sizing
Sinity Nov 12, 2025
f577e09
chore(repo): delete stale Claude LSP and pre-commit hook artifacts
Sinity Nov 12, 2025
5429f79
ci(workflows): rewrite PR guidance around nextest and schemas
Sinity Nov 12, 2025
0331bd5
docs(readme): clarify architecture and VM workflow sections
Sinity Nov 12, 2025
df9b427
feat(cli): add DLQ metrics and actionable RPC fallback hints
Sinity Nov 12, 2025
32cdaa1
feat(gateway): add replay control RPCs and native messaging
Sinity Nov 12, 2025
44e3775
fix(ingestd): use typed sqlx checks and tighten JetStream consumer pe…
Sinity Nov 12, 2025
0fe68f8
feat(processor-runtime): extend checkpoint parsing and runner coverage
Sinity Nov 12, 2025
7cd9fc9
refactor(sdk): rework heartbeat, annex, and confirmations
Sinity Nov 12, 2025
863db64
refactor(schema): tune migrations, exports, and tests
Sinity Nov 12, 2025
0317b9e
test(services): expand analytics/search regressions and migrate servi…
Sinity Nov 12, 2025
1095190
refactor(test-utils): tighten fixtures, benches, and helper docs
Sinity Nov 12, 2025
f61b235
fix(analytics-automaton): align internal result typing and convert lo…
Sinity Nov 12, 2025
ef5cfb5
feat(desktop): route oversized clipboard captures through git-annex-b…
Sinity Nov 12, 2025
0fc2612
test(document-ingestor): clean up direct-ingestion coverage
Sinity Nov 12, 2025
3d6fddc
refactor(fs-watcher): simplify config validation and related tests
Sinity Nov 12, 2025
643b645
fix(search-automaton): align result typing and migrate local checks t…
Sinity Nov 12, 2025
e7db94b
feat(system-satellite): expand watcher coverage and tests
Sinity Nov 12, 2025
81e962d
refactor(terminal-satellite): refine the unified processor and histor…
Sinity Nov 12, 2025
19cebd7
chore(scripts): remove obsolete dependency-graph, test-analytics, and…
Sinity Nov 12, 2025
bc09e85
docs(schema): document the schema regeneration workflow
Sinity Nov 12, 2025
7b92593
docs(todo): add JetStream-era historical context banners to backlog t…
Sinity Nov 12, 2025
3a0f819
docs(historical): annotate legacy design documents
Sinity Nov 12, 2025
475c18a
docs: update high-level analysis notes to reference `sinex-core` path…
Sinity Nov 12, 2025
267c345
docs(testing): add historical-context framing to test-suite report ar…
Sinity Nov 12, 2025
14fd80f
docs(testing): prepend testing-gap analysis with JetStream transition…
Sinity Nov 12, 2025
9206b12
docs: mark `way_2` modernization tasks complete and record concrete w…
Sinity Nov 12, 2025
67a145c
refactor(nixos): tighten database provisioning modules
Sinity Nov 12, 2025
9353c30
test: move CLI and Nix integration checks onto sinex_test_utils
Sinity Nov 12, 2025
ccac7ba
refactor(core): reconcile schema, replay, and repository surfaces
Sinity Nov 12, 2025
93e5c92
chore(gitignore): ignore `.devenv/` state artifacts
Sinity Nov 12, 2025
5be51c9
chore(lockfile): refresh `Cargo.lock` after toolchain/retry dependenc…
Sinity Nov 12, 2025
e2ee5d7
build: re-enable mold and the aggressive linker flags
Sinity Nov 12, 2025
16af1b5
perf(nixos,tests): raise Postgres defaults for parallel nextest
Sinity Nov 12, 2025
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
9 changes: 6 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
target-dir = "target"
incremental = true
pipelining = true
# Use all available CPU cores for compilation
# Use all available CPU cores for compilation (override locally if needed)
jobs = 24
rustc-workspace-wrapper = "scripts/rustc_wrapper.sh"

Expand All @@ -19,7 +19,7 @@ rustflags = [
"-C",
"link-arg=-fuse-ld=mold", # Fastest linker available
"-C",
"codegen-units=256", # Maximum parallelism
"codegen-units=256", # Maximize parallelism
"--check-cfg=cfg(rust_analyzer)",
]

Expand Down Expand Up @@ -57,12 +57,15 @@ cf = [
# Environment variables for coverage and testing
[env]
CARGO_LLVM_COV_TARGET_DIR = { value = "target/llvm-cov", relative = true }
PGHOST = "/run/postgresql"
PGUSER = "sinity"
PGDATABASE = "sinex_dev"
DATABASE_URL = "postgresql:///sinex_dev?host=/run/postgresql"

# Speed optimizations via environment variables
CARGO_INCREMENTAL = "1" # Enable incremental compilation
RUST_BACKTRACE = "0" # Disable backtraces for speed
# RUSTC_WRAPPER set dynamically in nix shell for sccache
CARGO_BUILD_JOBS = "0" # Use all CPU cores
CARGO_NET_GIT_FETCH_WITH_CLI = "false" # Faster git operations


Expand Down
27 changes: 0 additions & 27 deletions .claude/cclsp.json

This file was deleted.

4 changes: 2 additions & 2 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ slow-timeout = { period = "60s", terminate-after = 1 }

# CI parallel profile - balanced for reliability with good parallelism
[profile.ci-parallel]
# Use 75% of CPUs to leave headroom for system
test-threads = 18
# Use num-cpus and let runners size themselves (set NEXTEST_TEST_THREADS if you need to reserve headroom).
test-threads = "num-cpus"
failure-output = "immediate-final"
success-output = "never"
# One retry for flaky tests
Expand Down
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Sinex Development Environment Variables
# Copy this file to `.env` (which stays untracked) and customize as needed.

# Database connection (matches what's set in flake.nix devShell)
DATABASE_URL=postgresql:///sinex_dev?host=/run/postgresql
PGHOST=/run/postgresql
PGUSER=sinity
PGDATABASE=sinex_dev

# Optional overrides
# DATABASE_NAME=sinex_dev
# REDIS_URL=redis://localhost:6379
# RUST_LOG=debug
# SINEX_WORK_DIR=/tmp/sinex
54 changes: 0 additions & 54 deletions .githooks/pre-commit

This file was deleted.

30 changes: 12 additions & 18 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,29 @@

- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] All new and existing tests pass locally
- [ ] I have run `just test-fast` to verify basic functionality
- [ ] I have run `cargo nextest run --profile fast` to verify basic functionality

## Abstraction Compliance Checklist

### Database Operations
- [ ] All database queries use QueryBuilder from sinex-db
- [ ] No raw `sqlx::query!` or `sqlx::query_as!` calls
- [ ] ULID fields are handled by QueryBuilder (no manual `.to_uuid()`)
- [ ] Database access flows through `sinex-core` repositories/query helpers (no ad-hoc `PgPool` usage).
- [ ] SQL uses `sqlx::query!`/`query_as!` (compile-time checked) or `sqlx::QueryBuilder` for dynamic clauses—never raw string concatenation.
- [ ] ULIDs/UUIDs rely on the conversion helpers in `sinex-core::db` (no manual `.to_uuid()` / `.parse()` chains).

### Error Handling
- [ ] All errors use CoreError from sinex-error
- [ ] No `anyhow!` or `bail!` in production code
- [ ] Errors include proper context via `.context()`
- [ ] No `.unwrap()` or `.expect()` outside of tests
- [ ] Workspace crates return typed errors (`sinex_core::CoreError` or component-specific enums) rather than `anyhow!` in production paths.
- [ ] `.context()` (or equivalent) is used to enrich fallible operations.
- [ ] No `.unwrap()` / `.expect()` outside tests and intentional crash points.

### String Constants
- [ ] Event types use constants from `sinex_events::constants::event_types`
- [ ] Sources use constants from `sinex_events::constants::sources`
- [ ] Service names use constants from `sinex_events::constants::services`
- [ ] No hardcoded strings like `"process.heartbeat"` or `"core.events"`

### Validation
- [ ] Input validation uses ValidationChain from sinex-validation
- [ ] No manual validation logic for common patterns
### Validation & Constants
- [ ] Inputs go through the shared validation / sanitization helpers (`sinex_core::validation`, path sanitizers, etc.) instead of bespoke logic.
- [ ] Event/source/service identifiers reuse existing constants when available—avoid sprinkling string literals such as `"process.heartbeat"` throughout the codebase.

## Code Quality

- [ ] I have run `cargo fmt` to format my code
- [ ] I have run `cargo clippy` and addressed all warnings
- [ ] If schema definitions changed, I ran `./scripts/schema-dev.sh generate` and committed the updated `schemas/` artifacts
- [ ] I have added/updated documentation as needed
- [ ] My code follows the project's style guidelines

Expand All @@ -63,4 +57,4 @@
- [ ] No anti-patterns introduced (raw SQL, anyhow, hardcoded strings)
- [ ] Tests follow the same abstraction standards
- [ ] Documentation is clear and up-to-date
- [ ] Performance impact has been considered
- [ ] Performance impact has been considered
23 changes: 5 additions & 18 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,12 @@ This directory contains CI/CD workflows for the Sinex project.
- Updates schema registry in database
- Maintains schema version history

### `abstractions.yml` - Code Quality Checks
- Runs additional linting and analysis
- Checks for code abstractions and patterns
- Enforces architectural guidelines

## Local Testing

Run workflows locally using `act`:

```bash
# Install act
nix develop # Includes act

# Run CI workflow
act -W .github/workflows/ci.yml

# Run specific job
act -j build_and_test_linux
```
Workflows are designed to run inside the `nix develop` environment. If you want to execute
them locally with [`act`](https://github.com/nektos/act), install `act` separately and point
it at the desired workflow (for example: `act -W .github/workflows/ci.yml`). There is no
first-class wrapper in the dev shell today.

## Nix Integration

Expand Down Expand Up @@ -99,4 +86,4 @@ All workflows use Nix for reproducible builds:
- **PR Previews**: Live preview of changes
- **Test Coverage Reports**: Automated coverage tracking
- **Performance Reports**: Benchmark comparisons in PRs
- **Documentation Preview**: Build and preview docs changes
- **Documentation Preview**: Build and preview docs changes
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install ripgrep
run: |
sudo apt-get update
sudo apt-get install -y ripgrep

- name: Enforce forbidden pattern guards
run: bash scripts/check_forbidden_patterns.sh

Expand Down Expand Up @@ -112,7 +117,7 @@ jobs:
env:
DATABASE_URL: postgres://sinex_test:test_password@localhost/sinex_test
RUST_LOG: debug
run: cargo nextest run --all-features --workspace
run: cargo nextest run --all-features --workspace --profile reliable

coverage:
name: Code Coverage
Expand All @@ -136,6 +141,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install ripgrep
run: |
sudo apt-get update
sudo apt-get install -y ripgrep

- name: Enforce forbidden pattern guards
run: bash scripts/check_forbidden_patterns.sh

Expand Down Expand Up @@ -186,7 +196,7 @@ jobs:
- name: Generate code coverage
env:
DATABASE_URL: postgres://sinex_test:test_password@localhost/sinex_test
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
run: cargo llvm-cov --all-features --workspace --profile reliable --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sqlx-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

services:
postgres:
image: postgres:16
image: timescale/timescaledb:2.15.2-pg16 # Keep in sync with main CI runs
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: sinex_test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sqlx-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

services:
postgres:
image: postgres:16
image: timescale/timescaledb:2.15.2-pg16 # Align with main CI image
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ result-*
/spec/combo/
.claude-outputs/
.direnv/
.devenv/
compilation*log

# Rust compiler ICE dumps
Expand Down
Loading
Loading