Skip to content

Rename freedom-kernel -> authgate-kernel + fix CI + harden verifier#1

Merged
Aliipou merged 15 commits into
mainfrom
integration
Jun 1, 2026
Merged

Rename freedom-kernel -> authgate-kernel + fix CI + harden verifier#1
Aliipou merged 15 commits into
mainfrom
integration

Conversation

@Aliipou
Copy link
Copy Markdown
Owner

@Aliipou Aliipou commented Jun 1, 2026

What

  • Fixes CI (root cause): workflows build in authgate-kernel/ but the crate folder was freedom-kernel/. Renamed the folder + refs so they match (the Cargo package was already authgate-kernel).
  • Drops the unpleasant freedom-kernel name project-wide; pyproject module-name now aligns with the Cargo [lib] name authgate_kernel.
  • Adds kernel/hardened.py (HardenedVerifier) anchoring security-decisive inputs in trusted state, with a redteam/ regression suite (17/17), closing demonstrated exploits. Existing suite unaffected (1155 passed).
  • Repo hygiene: untrack 317 build/cache artifacts; .gitignore covers .hypothesis/ + target/.

Why

CI has failed on every push because of the directory mismatch (job dies in ~17s before reaching build/clippy). This makes the pipeline actually run.

🤖 Generated with Claude Code

alexanderthenth and others added 15 commits June 1, 2026 03:22
- review/: panel review, solution, v2 invariant spec, scope/limits, red-team findings
- kernel/hardened.py: trusted-input verifier closing demonstrated exploits
  (attacker min_epoch, self-declared flags, name identity, client is_public,
  stale snapshot, replay, dust-confidence) — 17/17 adversarial checks pass
- redteam/: runnable adversarial regression suite
- untrack 317 build/cache artifacts (.hypothesis, target/, .pytest_cache, .coverage)
- .gitignore: cover .hypothesis/ and all target/ dirs
- de-token origin remote URL (rotate the exposed PAT)

Existing suite unaffected: 1155 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ernal analysis docs

- Rename crate dirs/refs freedom-kernel -> authgate-kernel (matches repo +
  Cargo package name + CI working-directory); fixes the CI dir mismatch.
- pyproject module-name -> authgate_kernel (aligns with Cargo [lib] name).
- Remove review/ and OPTIMIZATION.md from the repo (kept locally).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… attribution-required, no commercial use without permission)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Move #![forbid(unsafe_code)] to line 1 in tcb/{engine,dag,call_gate}.rs +
  sequence.rs (was an inner attribute after outer doc comments — syntax error).
- ed25519-dalek v2: Signature::from_bytes is infallible; drop .map_err / let-else.
- Complete the half-finished wire refactor: add trust_domain/delegation_depth/
  trust_domains to every ResourceWire/ClaimWire/ActionWire/OwnershipRegistryWire
  literal (verifier, multi_agent, goal_tree, planner).
- WireValidationError: drop Eq derive (holds an f64).
- Allow unwrap/expect/panic/indexing in test code (zero-panic policy stays on lib).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- tcb/{engine,dag,call_gate}.rs: file-header ///->//! module docs (empty-line-after-doc)
- tcb/dag.rs: drop needless borrow in Sha256::digest
- authority_graph.rs: collapse nested ifs (collapsible_if x3)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- benches/verify_bench.rs: freedom_kernel -> authgate_kernel import
- tcb/hardening_tests.rs: give prop_assert! explicit messages (matches! braces
  were parsed as format args), drop unused validate_chain import, remove needless mut
- wire.rs: remove needless mut in test

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ints

- Cargo.toml: crate-type cdylib -> [cdylib, rlib] so benches/integration targets link the lib
- dag.rs tests: slice::from_ref instead of &[x.clone()]
- hardening_tests.rs: allow(module_inception); drop no-op u64::MAX & mask

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…for benches

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…l sandbox feature, upgrade pending)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ruff: autofix 211 lint issues (import sorting, unused imports, str+Enum,
  collections.abc) across src/ + tests/; split one-line for-loops; noqa late imports
- tests/test_hardened.py: cover HardenedVerifier (keeps coverage >= 85%: 86.2%)
- tcb/tests.rs: canonical-bytes length 196 -> 216 (correct field-size sum)
- deny.toml: allow Zlib (transitive dep license)

Local: ruff clean, 1167 passed, coverage 86.2%.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tions, wraps attr)

mypy src --ignore-missing-imports: Success, 63 files. ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sandbox) advisories

Verified with CI-exact tooling: ruff 0.15.15 clean, mypy 2.1.0 clean, 1167 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…visories)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… tests

Fixes pytest collection error (test_signed_audit) on CI where cryptography was absent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…stem

Closes the 23 'Entity cannot be converted to Entity' failures: when the Rust
PyO3 ext is installed, authgate.kernel switched to Rust types while adapters
built pure-Python Entities. The Python suite now validates the Python reference;
the Rust TCB is validated by the rust-check + TCB-tests jobs.

Verified (CI-exact): ruff 0.15.15 clean, mypy 2.1.0 clean, 1167 passed, cov 86%.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Aliipou Aliipou merged commit 5ff1f3d into main Jun 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants