Skip to content

Agentic engineering: lint/CI/supply-chain policy + deckard-core hardening - #8

Merged
hellno merged 4 commits into
mainfrom
hellno/rust-agent-lint-rules
Jun 8, 2026
Merged

Agentic engineering: lint/CI/supply-chain policy + deckard-core hardening#8
hellno merged 4 commits into
mainfrom
hellno/rust-agent-lint-rules

Conversation

@hellno

@hellno hellno commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Adds an agentic-engineering guardrail layer so coding agents (and humans) write reliable Rust fast: the lint policy moves into the manifest ([workspace.lints] + clippy.toml + a checked-in rustfmt.toml) and CI now enforces fmt --check, clippy -D warnings on both feature configs, cargo test, --locked, and a non-blocking cargo-deny supply-chain gate. The security engine deckard-core is locked down with #![forbid(unsafe_code)] plus crate-level denies of unwrap/expect/panic/raw-indexing in non-test code, its untrusted-byte parser refactored to bounds-checked accessors, and #[must_use] on the secret types. A one-time cargo fmt baseline (separate commit) normalizes pre-existing formatting drift. Rationale and the deliberately-rejected rules live in docs/AGENTIC-ENGINEERING.md (written to share upstream with the Deck starter), with CLAUDE.md/AGENTS.md updated and the Tier 2/3 backlog tracked in #7. All changes verified green (clippy both configs, 13 tests, fmt) and cross-model reviewed by codex GPT-5.5.

hellno added 2 commits June 6, 2026 16:47
One-time normalization so the new `cargo fmt --all --check` CI gate passes. Formatting only — no logic changes (rustfmt never alters semantics).
Move the lint policy into the manifest and enforce it in CI so agents see the
same rules at `cargo check` time that CI gates:

- [workspace.lints] + [lints] in both crates; clippy.toml (msrv 1.95,
  disallowed-methods: mem::forget/thread_rng); checked-in rustfmt.toml.
- deckard-core: #![forbid(unsafe_code)] + #![deny(unwrap_used, expect_used,
  get_unwrap, indexing_slicing, panic, mem_forget)]. The untrusted-byte parser
  is refactored to bounds-checked .get()/.first()/try_into(); the two
  startup-fatal expects carry a documented #[allow]; #[must_use] on the secret
  types (Vault/UnlockedVault).
- deny.toml + non-blocking cargo-deny CI job (advisories/licenses/bans/sources).
- CI: add fmt --check, default-feature clippy, cargo test, and --locked.
- docs/AGENTIC-ENGINEERING.md (shareable upstream with Deck) + CLAUDE.md/AGENTS.md.

Verified green: clippy (default + tray), cargo test 13/13, cargo fmt --check.
Cross-model reviewed by codex GPT-5.5. Tier 2/3 backlog: #7.
hellno added 2 commits June 7, 2026 22:10
Vault::open collapses every unlock failure (parse, KDF, wrong-pass, AEAD, IO)
to one generic message so the unlock screen can't reveal whether a vault is
tampered/corrupt vs the passphrase wrong. Also adds `just core` (fast GPUI-free
engine loop) and frozen v1 decode-compat fixtures.
Integrate main's virtual-workspace restructure (deckard-app/core/contract/signerd),
verified reads (Helios), the key-less shield path, and the signer daemon WITH the
agentic-engineering hardening (workspace lints, deckard-core restriction lints +
forbid-unsafe, keystore no-oracle Vault::open contract, CI gates, docs).

Conflicts resolved: Cargo.toml (virtual workspace + workspace.lints), ci.yml + justfile
(combined coverage + --locked/fmt-check/cargo-deny/just core), lib.rs/eth.rs (main +
re-applied lint block & the two startup expect allows), shell.rs/main.rs/welcome.rs
(main; the unlock oracle is now handled by the daemon's UnlockOutcome::BadPassphrase
collapse, so the keystore Vault::open contract is complementary). deny.toml + AGENTS.md
+ docs/AGENTIC-ENGINEERING.md adapted to the new 4-crate workspace.

Verified green: clippy --workspace -D warnings (default + tray), cargo test --workspace
(81 passed, 1 ignored), cargo fmt --check. Merge reviewed cross-model by codex GPT-5.5.
@hellno
hellno merged commit 4794415 into main Jun 8, 2026
1 of 3 checks passed
hellno pushed a commit that referenced this pull request Jun 14, 2026
Second decision round (2026-06-14):
- Ambition: harvest aligned attributes, do not climb the Stage ladder
- Hardware-wallet signing (#4): out of scope (deliberate non-goal)
- Browser integration (#25): deferred; MCP agent is the sole connection
  surface; app isolation (#11) reframed as per-agent/session isolation
- Account abstraction (#26): EIP-7702 research spike (on-chain agent
  policy), batching (#27) contingent on it
- Multi-identity (#8/#9): a post-v0 goal with non-correlation UX

Rewrites the Stages section as reference-only.
hellno pushed a commit that referenced this pull request Jun 14, 2026
Validate the code-fit layer from a four-cluster read of the actual
codebase: per-item crate placement, seam-vs-expansion, size, and risk,
plus an EIP-7702 spike brief.

Key findings:
- deckard-core already has the right seams (multi-account derivation,
  reserved enclave flag, alloy/7702-ready builder-agnostic broadcast)
- Un-gating Send is UI-only (daemon path tested) and the dependency hub
- deckard-contract (frozen) is the higher-ceremony expansion point;
  batch RevokeApproval/Intent::Batch/session-token changes together
- Re-tier #13 RPC-before-first-request UP to L (provider spawns with
  DEFAULT_RPC before the auth gate); re-tier #8/#9 multi-identity DOWN
  (core already derives accounts)

Reworks the sequencing tiers with the measured sizes.
hellno pushed a commit that referenced this pull request Jun 14, 2026
Second decision round (2026-06-14):
- Ambition: harvest aligned attributes, do not climb the Stage ladder
- Hardware-wallet signing (#4): out of scope (deliberate non-goal)
- Browser integration (#25): deferred; MCP agent is the sole connection
  surface; app isolation (#11) reframed as per-agent/session isolation
- Account abstraction (#26): EIP-7702 research spike (on-chain agent
  policy), batching (#27) contingent on it
- Multi-identity (#8/#9): a post-v0 goal with non-correlation UX

Rewrites the Stages section as reference-only.
hellno pushed a commit that referenced this pull request Jun 14, 2026
Validate the code-fit layer from a four-cluster read of the actual
codebase: per-item crate placement, seam-vs-expansion, size, and risk,
plus an EIP-7702 spike brief.

Key findings:
- deckard-core already has the right seams (multi-account derivation,
  reserved enclave flag, alloy/7702-ready builder-agnostic broadcast)
- Un-gating Send is UI-only (daemon path tested) and the dependency hub
- deckard-contract (frozen) is the higher-ceremony expansion point;
  batch RevokeApproval/Intent::Batch/session-token changes together
- Re-tier #13 RPC-before-first-request UP to L (provider spawns with
  DEFAULT_RPC before the auth gate); re-tier #8/#9 multi-identity DOWN
  (core already derives accounts)

Reworks the sequencing tiers with the measured sizes.
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.

1 participant