Skip to content

Commit 82f041b

Browse files
committed
Initilaized project complete Phase 0 foundation — workspace, types, schema, error hierarchy, storage trait, test harness, CI
- Rust workspace with aegis-core + aegis-test-utils crates - Core types: SubjectId, ResourceId, Relation (validated newtypes with injection prevention) - Data model: RelationshipTuple, Revision, RevisionToken, ConsistencyMode, Schema, TupleKey - Error hierarchy: AegisError with 20+ variants across 6 categories - Schema parser + linter: YAML parser, orphan detection, circular inheritance check, compatibility checker - StorageBackend trait (15 methods) + StorageTransaction trait + full filter/pagination types - TestAegis in-memory engine with write/check/delete/list/query/pagination + fixture loader - 4 built-in test fixtures (basic-team, multi-tenant, deep-hierarchy, circular) - GitHub Actions CI: format, clippy, test (debug+release), coverage, security audit - Updated aegis-spec.md (1982 lines, adds 5 new sections, fixes all inconsistencies) - aegis-test-plan.md (567 lines, 180 test cases across 12 categories) - IMPLEMENTATION.md (36 KB, 25 sprints across 4 phases with full dependency graph) - .gitignore for Rust/IDE/OS artifacts 89 tests passing across both crates, 0 warnings, 0 errors.
0 parents  commit 82f041b

25 files changed

Lines changed: 6221 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: "-D warnings"
12+
13+
jobs:
14+
check:
15+
name: Check & Lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions-rust-lang/setup-rust-toolchain@v1
20+
with:
21+
components: clippy, rustfmt
22+
- name: Check formatting
23+
run: cargo fmt --all -- --check
24+
- name: Clippy
25+
run: cargo clippy --all-targets --all-features -- -D warnings
26+
- name: Check compilation
27+
run: cargo check --all-targets --all-features
28+
29+
test:
30+
name: Test
31+
runs-on: ubuntu-latest
32+
needs: [check]
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: actions-rust-lang/setup-rust-toolchain@v1
36+
- name: Run tests
37+
run: cargo test --all-features --workspace
38+
- name: Run tests (release)
39+
run: cargo test --all-features --workspace --release
40+
41+
coverage:
42+
name: Code Coverage
43+
runs-on: ubuntu-latest
44+
needs: [test]
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions-rust-lang/setup-rust-toolchain@v1
48+
with:
49+
components: llvm-tools-preview
50+
- name: Install cargo-llvm-cov
51+
uses: taiki-e/install-action@cargo-llvm-cov
52+
- name: Generate coverage
53+
run: cargo llvm-cov --all-features --workspace --lcov --output-path coverage.lcov
54+
- name: Upload coverage
55+
uses: codecov/codecov-action@v4
56+
with:
57+
files: coverage.lcov
58+
59+
audit:
60+
name: Security Audit
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
- name: Install cargo-audit
65+
run: cargo install cargo-audit
66+
- name: Audit dependencies
67+
run: cargo audit

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Rust build artifacts
2+
target/
3+
Cargo.lock
4+
5+
# IDE and editor files
6+
.vs/
7+
.vscode/
8+
.idea/
9+
*.swp
10+
*.swo
11+
*~
12+
13+
# OS files
14+
.DS_Store
15+
Thumbs.db
16+
desktop.ini
17+
18+
# Test and temp files
19+
*.db
20+
*.db-wal
21+
*.db-shm
22+
*.backup
23+
*.log
24+
tmp/
25+
temp/

Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[workspace]
2+
resolver = "2"
3+
members = [
4+
"crates/aegis-core",
5+
"crates/aegis-test-utils",
6+
]
7+
8+
[workspace.package]
9+
version = "0.1.0"
10+
edition = "2024"
11+
license = "MIT"
12+
repository = "https://github.com/aegis-auth/aegis"
13+
14+
[workspace.dependencies]
15+
serde = { version = "1", features = ["derive"] }
16+
serde_yaml = "0.9"
17+
thiserror = "2"
18+
uuid = { version = "1", features = ["v4", "serde"] }
19+
chrono = { version = "0.4", features = ["serde"] }

IMPLEMENTATION.md

Lines changed: 605 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)