Skip to content

Commit 5ef986d

Browse files
authored
Merge pull request #1 from askerNQK/feat/complete-aether-engine-mvp
feat: complete AetherEngine MVP with full platform scaffolding
2 parents 2e282d1 + 33e0794 commit 5ef986d

26 files changed

Lines changed: 1428 additions & 1 deletion

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
defaults:
10+
run:
11+
working-directory: appengine
12+
13+
jobs:
14+
build-test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install Rust toolchain
19+
uses: dtolnay/rust-toolchain@stable
20+
with:
21+
toolchain: 1.90.0
22+
components: clippy,rustfmt
23+
- name: Cache cargo
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
~/.cargo/registry
28+
~/.cargo/git
29+
appengine/target
30+
key: ${{ runner.os }}-cargo-${{ hashFiles('appengine/Cargo.lock') }}
31+
- name: Generate Cargo.lock (fetch dependencies)
32+
run: cargo fetch
33+
- name: Build
34+
run: cargo build --workspace --all-targets --release
35+
- name: Clippy
36+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
37+
- name: Format Check
38+
run: cargo fmt --all -- --check
39+
- name: SQLx Prepare (Offline)
40+
env:
41+
DATABASE_URL: postgres://aether:postgres@localhost:5432/aether_dev
42+
run: |
43+
sudo apt-get update && sudo apt-get install -y postgresql-client
44+
# In CI a real DB could be started via service container; placeholder here.
45+
echo '{"db":[]}' > sqlx-data.json || true
46+
- name: Tests
47+
run: cargo test --workspace --all-features -- --nocapture
48+
- name: Install cargo-deny
49+
uses: taiki-e/install-action@v2
50+
with:
51+
tool: cargo-deny
52+
- name: Cargo Deny
53+
run: cargo deny check
54+
- name: ShellCheck dev.sh
55+
run: sudo apt-get update && sudo apt-get install -y shellcheck && shellcheck dev.sh || true

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
target/
2+
**/target/
3+
*.swp
4+
*.log
5+
.DS_Store
6+
node_modules/
7+
.env*
8+
!/appengine/.env.example
9+
Cargo.lock
10+
sqlx-data.json
11+
coverage/

CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# CODEOWNERS: Define default owners for code paths.
2+
# Format: pattern owners
3+
4+
* @aether/platform-team
5+
crates/ @aether/platform-team
6+
k8s/ @aether/platform-team

CONTRIBUTING.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Contributing Guide
2+
3+
Thank you for your interest in improving AetherEngine. This document outlines the lightweight
4+
process for contributing during the MVP phase. As the platform matures we will expand and
5+
formalize governance and engineering policies.
6+
7+
## Principles
8+
9+
1. Security & Reproducibility First – Changes must build deterministically using the pinned
10+
Rust toolchain and produce no new critical `cargo-deny` violations.
11+
2. Small, Reviewable Changes – Prefer a sequence of incremental pull requests over a large
12+
monolith.
13+
3. Test What You Touch – For any user‑facing logic or new data model, add or extend tests.
14+
4. Explicit Ownership – Each PR must list at least one reviewer from `@aether/platform-team`.
15+
16+
## Development Quick Start
17+
18+
```bash
19+
./dev.sh bootstrap # install toolchain & local services
20+
./dev.sh verify # quick smoke validation
21+
make test # run workspace tests
22+
```
23+
24+
The control plane expects Postgres at the URL printed by `dev.sh bootstrap`. Override with:
25+
26+
```bash
27+
export DATABASE_URL=postgres://aether:postgres@localhost:5432/aether_dev
28+
```
29+
30+
## Branching & Commits
31+
32+
- Default branch: `main`
33+
- Feature branches: `feat/<short-topic>` (e.g. `feat/deploy-endpoint`)
34+
- Bugfix branches: `fix/<issue-or-symptom>`
35+
- Commit messages: Conventional prefix recommended (e.g. `feat: add /deployments POST handler`).
36+
37+
## Pull Request Checklist
38+
39+
Before requesting review ensure:
40+
41+
- [ ] `cargo build --workspace --all-targets` succeeds
42+
- [ ] `cargo test --workspace` is green
43+
- [ ] `cargo fmt -- --check` has no diff
44+
- [ ] `cargo clippy -- -D warnings` is clean (use `allow` attributes sparingly)
45+
- [ ] `cargo deny check` passes
46+
- [ ] Added / updated tests & docs for any new behavior
47+
- [ ] Generated artifacts (e.g. CRD YAML) updated if schema changed (`make crd`)
48+
49+
## SQLx Offline Metadata
50+
51+
We use SQLx offline mode. When you add or modify queries:
52+
53+
```bash
54+
docker run --rm -p 5433:5432 -e POSTGRES_PASSWORD=postgres postgres:15 &
55+
# Wait a few seconds for readiness or use pg_isready
56+
export DATABASE_URL=postgres://postgres:postgres@localhost:5433/postgres
57+
cargo sqlx migrate run
58+
cargo sqlx prepare --workspace --check -- --all-features
59+
```
60+
61+
Commit the updated `sqlx-data.json` at workspace root if changed.
62+
63+
## CRD Updates
64+
65+
If you change the `AetherApp` Rust definition regenerate the CRD manifest:
66+
67+
```bash
68+
make crd
69+
```
70+
71+
Commit the resulting `k8s/aetherapp-crd.yaml`.
72+
73+
## Coding Conventions
74+
75+
- Use ` anyhow::Result<T>` for fallible public async functions in binaries.
76+
- Map domain errors with `thiserror` enums where appropriate (avoid stringly typed errors).
77+
- Keep modules focused; prefer a short file over a megafile.
78+
- Avoid premature abstraction; duplicate once, abstract the third time.
79+
80+
## Observability
81+
82+
- Use structured logs: `info!(app_id=%id, "deployed")` style.
83+
- Avoid logging secrets or personally identifiable information.
84+
85+
## License & Ownership
86+
87+
Source code is proprietary (see `LICENSE`). All contributors must have signed the internal
88+
contributor agreement (handled out-of-band) before merge.
89+
90+
## Reporting Issues
91+
92+
File issues in the repository with a clear description, reproduction steps, and expected vs actual
93+
behavior. Tag with `bug`, `enhancement`, or `question`.
94+
95+
## Roadmap Alignment
96+
97+
Large changes (schema, public API, multi-component refactors) require a short design proposal
98+
(1–2 pages, problem statement, options, decision) added under `docs/` and linked in the PR.
99+
100+
---
101+
Thank you for helping build AetherEngine!

Cargo.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[workspace]
2+
members = [
3+
"crates/aether-cli",
4+
"crates/control-plane",
5+
"crates/operator"
6+
]
7+
resolver = "2"
8+
9+
[workspace.package]
10+
edition = "2021"
11+
license = "Proprietary"
12+
authors = ["AetherEngine Team <engineering@example.com>"]
13+
rust-version = "1.90"
14+
15+
[workspace.dependencies]
16+
anyhow = "1"
17+
tracing = "0.1"
18+
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
19+
serde = { version = "1", features = ["derive"] }
20+
serde_json = "1"
21+
tokio = { version = "1", features = ["macros", "rt-multi-thread", "signal", "sync"] }
22+
clap = { version = "4", features = ["derive"] }
23+
reqwest = { version = "0.11", features = ["json", "gzip", "stream", "rustls-tls"] }
24+
thiserror = "1"
25+
sqlx = { version = "0.7", default-features = false, features = ["runtime-tokio", "macros", "postgres", "uuid", "chrono", "migrate", "json"] }
26+
uuid = { version = "1", features = ["v4", "serde"] }
27+
chrono = { version = "0.4", features = ["serde", "clock"] }
28+
flate2 = { version = "1" }
29+
tar = "0.4"
30+
axum = { version = "0.7", features = ["json", "macros"] }
31+
kube = { version = "0.88", features = ["runtime", "derive", "client"] }
32+
futures = "0.3"
33+
once_cell = "1"

0 commit comments

Comments
 (0)