Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0ebacb6
test(tinyclaw): hermetic env scrubber for integration tests
Aug 6, 2026
bb58063
Merge pull request 'test(tinyclaw): hermetic env scrubber for integra…
AlexMikhalev Aug 7, 2026
5f13828
fix(deps): redirect crates.io terraphim_sessions 1.21.0 to private 1.…
Aug 7, 2026
ad9efce
chore: update Cargo.lock to reflect terraphim_sessions [patch.crates-…
Aug 7, 2026
19c9dd8
feat(security-sentinel): agent work [auto-commit]
Aug 7, 2026
c7e7572
feat(security-sentinel): agent work [auto-commit]
Aug 7, 2026
b4a51c7
feat(security-sentinel): agent work [auto-commit]
Aug 7, 2026
5046f08
feat(security-sentinel): agent work [auto-commit]
Aug 7, 2026
5ae3068
feat(security-sentinel): agent work [auto-commit]
Aug 7, 2026
9d84d6e
feat(tinyclaw): Wave 1 credentials subsystem with router integration
Aug 7, 2026
649620b
fix(tinyclaw): address P2 findings from structural review
Aug 7, 2026
bfd764d
Merge pull request 'feat(tinyclaw): Wave 1 credentials subsystem with…
AlexMikhalev Aug 7, 2026
4f71ced
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
b9965f3
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
1894eb3
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
5bb9101
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
20b6b6a
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
d8e4356
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
1efdcb7
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
8a81755
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
a959061
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
b3772be
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
9a8f16e
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
1ddb0b3
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
62e9cf0
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
8453677
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
963fa62
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
b3b2a77
feat(tinyclaw): Wave 4 channels + ACP adapter
Aug 8, 2026
1f09cbb
refactor(tinyclaw): reduce ACP router cyclomatic complexity
Aug 8, 2026
0f849dc
feat(fleet-standard): toolchain pin + build-dir + skills.toml + memory
Aug 8, 2026
073c467
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
1d7cf1c
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
aec5d8a
fix(security): constant-time HMAC + Bearer token for fire webhook
Aug 8, 2026
81214df
chore(tinyclaw): add opendal direct dep for ErrorKind matching
Aug 8, 2026
16c6188
fix(cron): match opendal::ErrorKind::NotFound via typed enum
Aug 8, 2026
699a5b8
test(cron): pin opendal::ErrorKind::NotFound behaviour for missing jobs
Aug 8, 2026
7aa03fb
test(gitea): pin webhook hex validation edge cases
Aug 8, 2026
600f76e
docs(adr-0007): activate cargo-deny gate, document Wave 4 supply-chai…
Aug 8, 2026
d5fb78d
feat(security-sentinel): agent work [auto-commit]
Aug 8, 2026
e545857
fix(cargo-deny): resolve 3 advisories (crossbeam-epoch + quick-xml + …
Aug 8, 2026
bc9d019
docs: multi-client learn hooks + Phase 2/3 rewriting howto
AlexMikhalev Aug 8, 2026
c2e2541
docs: fix P1s from independent structural-pr-review (Sonnet+MiniMax)
AlexMikhalev Aug 8, 2026
ca5a130
docs: mark multi-client plan path as internal (R2 P2)
AlexMikhalev Aug 8, 2026
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
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]

# Build configuration
[build]
# Fleet standard §1.3: name-keyed build-dir override.
build-dir = "{cargo-cache-home}/build/by-project/terraphim-terraphim-ai"
# Default target intentionally left as host; set --target explicitly (use `cross` for Linux)

# Cross-compilation settings (commented out - let cross-rs handle Docker images)
Expand Down
70 changes: 70 additions & 0 deletions .docs/adr-0006-toolchain-pin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# ADR-0006: Rust toolchain pin (rust-toolchain.toml)

**Status:** ADOPTED (2026-08-08)
**Deciders:** Hermes Agent (session review of TinyClaw ↔ Hermes parity work)
**Fleet mandate:** `rust-fleet-standard` §1.4

## Context

Per `rust-fleet-standard` §1.4, every fleet Rust repo MUST commit a root
`rust-toolchain.toml` with channel + `rustfmt` + `clippy` components. Drift
between the pin and workspace `rust-version` must be recorded explicitly
with rationale.

Before this ADR, `terraphim-ai` had no `rust-toolchain.toml`. The session
that delivered the TinyClaw ↔ Hermes parity epic added it, but the
initial pin (1.93) was wrong and broke the build because `sysinfo@0.39.5`
requires `rustc >= 1.95`.

## Decision

Pin `channel = "1.96"` (default stable on the reference box, 2026-04-16).

## MSRV trace

| Step | Value | Why |
|------|-------|-----|
| Workspace `rust-version` (Cargo.toml `[workspace.package]`) | 1.91 | Set by prior maintainer; reflects the lowest crate's stated MSRV |
| `sysinfo@0.39.5` transitive dep | requires `rustc >= 1.95` | Newest published version, no older 1.91-compatible line |
| Candidate pin 1.93 | REJECT | Build breaks: `error: rustc 1.93.1 is not supported by sysinfo@0.39.5` |
| Candidate pin 1.95 | ADOPTED (initial) | Builds clean; matches the tightest dep constraint |
| Final pin 1.96 | ADOPTED (this revision) | Default stable on this host; probe verified all workspace deps compile |

## Alternatives considered

- **Pin 1.95** — builds, but ties us to an older minor. 1.96 is the
default on this host and the wider fleet baseline.
- **Pin nightly** — rejected: nightly drift breaks reproducibility and
§1.4 specifies a stable channel.
- **Pin MSRV (1.91)** — rejected: requires downgrading `sysinfo` to a
pre-0.39 line and blocking several other transitive deps. Out of
scope for the fleet rollout window.
- **Set `rust-version = "1.91"` but no toolchain pin** — pre-ADR state.
REJECT per §1.4.

## Consequences

- All CI workers + dev boxes that build `terraphim-ai` MUST have
`rustup toolchain install 1.96` or use the auto-install path
(`rust-toolchain.toml` triggers this automatically when `rustup` is
present).
- Workspace `rust-version` (1.91) is now intentionally LOWER than the
toolchain pin. This is allowed by §1.4 ("record the decision") but
must be flagged at next dependency audit.
- If a new dep requires `rustc > 1.96`, this ADR must be revised and
re-merged.

## Verification

```bash
cargo check -p terraphim_tinyclaw # exits 0
cargo test -p terraphim_tinyclaw --all-targets --no-fail-fast
# Result: 349 passed, 0 failed
```

## References

- `rust-fleet-standard` skill §1.4
- `/home/alex/projects/cto-executive-system/2026-08-08-rust-fleet-standard.md`
- `memory/2026-08-08.md` (session log of the parity work)
- `memory/regressions.md` (rule: ADOPT/ADAPT/REJECT every fleet mandate violation in code)
67 changes: 67 additions & 0 deletions .docs/adr-0007-cargo-deny-gate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ADR-0007: Cargo-deny gate activation

**Status:** ADOPTED (2026-08-08)
**Deciders:** Hermes Agent (session review of TinyClaw ↔ Hermes parity work)
**Fleet mandate:** `rust-fleet-standard` §1.5

## Context

Per `rust-fleet-standard` §1.5, every PR gate must include `cargo deny check`. The configuration file `deny.toml` was committed to the repo but **cargo-deny itself was never installed** and the gate had never been run.

Running `cargo deny check` for the first time on 2026-08-08 against `terraphim-ai` workspace revealed:

```
advisories FAILED, bans ok, licenses FAILED, sources ok
```

Two real findings of fleet-standard significance:

1. **Unlicensed path-deps introduced by Wave 4 of this session.** `jmap_client` (1.0.0) and `haystack_core` (0.2.0) — both from `terraphim-private` workspace — do not declare a `license` field in their Cargo.toml. **This is a supply-chain hygiene gap I introduced by adding `jmap_client` as a path dep without first verifying the sibling's license metadata.**

2. **Cargo.lock vulnerability in `crossbeam-epoch 0.9.18`** (CVE in `fmt::Pointer` impl for `Atomic`/`Shared`). Dev-only dep via `criterion` → `rayon`. Not in our runtime, but still flagged by the gate.

## Decision

**Activate the cargo-deny gate.** Block merge on FAILED status. Document the current state and the path to green.

## Action items (in priority order)

1. **File Gitea issue** in `terraphim-private` asking for `license = "Apache-2.0 OR MIT"` to be added to `jmap_client` and `haystack_core` Cargo.toml files. **(fleet-standard supply-chain fix)**

2. **Add `MIT-0` to `deny.toml` allow list** (single-line cleanup, lets `borrow-or-share 0.2.4` pass).

3. **Verify `quick-xml 0.38.4` vulnerability status** — the deny output is ambiguous because the CVE is filed against 0.37.5. If 0.38.4 is also flagged, bump opendal. If only 0.37.5 is flagged, no action needed.

4. **Clean up stale `ignore` entries** in `deny.toml` (5 RUSTSEC IDs no longer match anything in the dep graph).

5. **Track as fleet-rollout issue** in `terraphim-ai` per §1.6 (issue → gitea-robot claim → design gate → fix).

## Verification

```bash
cargo install cargo-deny --locked # ~3 min compile
cargo deny check 2>&1 | tail -3
# Current: advisories FAILED, bans ok, licenses FAILED, sources ok
# Target: all 4 sections ok
```

## What This Means for the Merge Bar

**Workspace is NOT currently fleet-standard §1.5 compliant.** All previous PRs (including this session's Wave 4 Hermes parity work) bypassed the cargo-deny gate because the gate was never wired.

The 355-test pass + clippy clean + fmt clean is necessary but **not sufficient**.

## Lessons Learned

1. **The fleet standard is right.** This is exactly the kind of issue the standard was designed to catch — a new path-dep was added without verifying supply-chain metadata. Without cargo-deny in the merge gate, this would have shipped uncorrected.

2. **Configuration is not enforcement.** `deny.toml` was committed but `cargo deny` was never installed. The gate existed in form but not in function. **A standard is only as strong as its enforcement.**

3. **Audit-before-implement.** I should have run `cargo deny check` BEFORE adding `jmap_client` as a path dep, not after. The discipline pattern: check the store before adding to the cart.

## References

- `/home/alex/projects/cto-executive-system/2026-08-08-cargo-deny-findings.md` — full findings report
- `deny.toml` — gate config (untouched, gated work is at the action items above)
- `rust-fleet-standard` skill §1.5 (validation stack mandate)
- `memory/regressions.md` §5 (claim-sudo-without-checking) — sister "audit before action" lesson
Loading