Commit graph

20 commits

Author SHA1 Message Date
0xkite
6971f61f00
Merge current PR #23 head 4097a21 with validated Apple repairs
Merge PR #23 head 4097a21adb (Velinus's
"Make Apple resource sampling lifecycle safe") into the Layer-2
integration branch, preserving all contributor commits unchanged.

Retained proven fixes from 4097a21:
- Sampler creation moves into start_finalizer() so a sampler
  std::system_error is reported synchronously to the caller. In
  ca8600a the sampler was constructed inside finalize() after the
  caller had treated startup as successful; the failure path
  published an error without attach reaping, container deletion, or
  durable mark_managed_failed, and set finished_ so stop() became a
  no-op while attach/container survived.

Repairs retained beyond the contributor head, each bound to a
demonstrated failure:
- std::jthread + deterministic stop_token handles the partial-start
  case where sampler construction succeeds but finalizer launch
  fails (regression: tests/control/apple_container_unavailable_test
  and the start_sampler_then_finalizer seam used by production).
- Restored hard-disabled Apple boundary: lifecycle_operational()
  false, receipt schema 0, disk enforcement unavailable, empty
  managed runtime advertisement, and public method denial before
  any side effect. The current PR #23 head crossed the reviewed
  activation boundary (schema 0 -> 1, filesystem_quota advertised,
  lifecycle constructed-state true) without live-validation.
- glaze parsing hardened: strict_json_options now sets
  null_terminated=false; non-NUL-terminated string_views fed
  parse_apple_container_stats and duplicate_key_guard caused a
  heap-buffer-overflow read in glz::skip_ws (ASan crash input
  [{"id":"aanumProcesses" reproduced deterministically; seed corpus
  fuzz/corpus/apple_container_stats/truncated-object.json added).
- Sage bundle projection admission hardening (Layer-1 2bba117) and
  its test coverage carried through the merge.

Validation (umask 0022):
- Dev CTest 76/76; ASan/UBSan 76/76; TSan 76/76.
- libFuzzer 10,000 units each: library_bundle, session_plan,
  apple_container_stats (LLVM 22, ASan/UBSan), all fuzz_exit=0.
- clang-format clean on changed TUs; git diff --check clean.
2026-08-29 09:41:16 -06:00
0xkite
2bba117d2a
fix(supervisor): harden bundle projection admission
Preserve known non-skill metadata in projection commitments, reject duplicate and oversized bundles, close Codex exec grammar ambiguity, and keep raw-bundle requirements explicit. Keep layer-2 Sage materialization tests out of this layer.

Validated by the exact layer-1 build and 75-test suite; Apple lifecycle remains a separately skipped layer-2 concern.

Signed-off-by: 0xkite <me@hack4kitesdev.dev>
2026-08-29 09:02:55 -06:00
velinussage
583608c31b fix: close Apple lifecycle review gaps 2026-08-28 21:53:35 -04:00
velinussage
7f2118c325 phase-3 Add read-only Sage guest projection
Bind digest-addressed Sage bundles and immutable guest identity into the constrained Apple Container runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 20:53:11 -04:00
velinussage
4fe180a38f Accept known non-skill Sage bundle kinds and place Codex exec flags after exec.
Mixed libraries were failing start because any non-skill entry aborted the
projection. The managed sandbox bypass also has to sit after `exec` so
headless Codex can run inside Glove.
2026-08-28 09:49:29 -04:00
0xkite
3ba6ce46a1
fix(adoption): align snapshot digest ordering
Revalidation walked immutable payloads depth-first while planning hashed a flat lexicographic path sequence. Sort bounded descriptor-safe records before hashing so valid adopted Pi packages retain their canonical identity.
2026-08-23 21:19:23 -06:00
0xkite
ad02703151
fix(ci): require complete designated initializers 2026-08-14 15:27:14 -06:00
0xkite
afa46f901a
style: apply pinned clang-format baseline 2026-08-14 13:20:48 -06:00
trvon
afecee2c90
feat(remote): add construction-only backend
Co-authored-by: trvon <git@trevon.dev>
Signed-off-by: trvon <git@trevon.dev>
2026-08-07 22:27:35 -04:00
trvon
c3a6c1b7d1
feat(adoption): harden Pi harness sessions
Bind Glove-owned Pi adoption snapshots to launch profiles and receipts while keeping host state out of private homes. Add an offline hostile-content policy and repeatable Linux service setup.
2026-08-02 18:10:55 -04:00
trvon
825a129fbd
feat(refinement): evaluate fixtures in sandbox
Model and PTY cannot self-report pass or failure. Glove now runs
each refinement-eval-v1 session through a declarative evaluator that
checks bounded fixture assertions (termination cause, exit code, max
latency, required and forbidden transcript literals) against audited
resource events, then binds the evaluated outcome inside the
authenticated receipt digest. Capability advances to version 1 with
the evaluator landed.
2026-07-31 16:07:43 -04:00
trvon
2ab53bcc35
feat(refinement): define evidence protocol 2026-07-31 14:08:28 -04:00
0xkite
497e703e70
feat(runtime): manage sandboxed agent sessions
Keep credentials and network access behind authenticated, audited brokers while binding launch adapters, immutable closures, recovery identities, receipts, and cleanup to the approved plan. Add Apple Container and Linux release lanes without weakening the outer sandbox.
2026-07-30 08:49:42 -04:00
0xkite
b96bc76a53
fix(runtime): harden managed host launches
Run the Linux service in a delegated user and mount namespace and preserve precise owner-local launch diagnostics while keeping remote denials generic.

Accept validated v2 session plans without bypassing direct-write consent, and bind explicit native runtimes through the same managed launch and receipt boundary.
2026-07-29 12:47:23 -04:00
0xkite
d09032b30e
feat(supervisor): enforce native harness sessions
Bind runtime homes, mounts, and receipts to verified adapter context.\nReject malformed launch encodings before execution.
2026-07-28 11:00:17 -04:00
0xkite
82236d9501
feat(supervisor): generalize native harness launch 2026-07-28 00:16:04 -04:00
0xkite
3e9cd0680c
test(journal): inject append failures
Exercise partial-write plus disk-full and sync failures to prove rollback, retry, and replay behavior.
2026-07-21 22:25:05 -04:00
0xkite
6081eb8884
test(fuzz): cover untrusted parser boundaries 2026-07-21 22:23:45 -04:00
0xkite
0fe581b028
Add bounded path exposure and retained apply controls 2026-07-20 08:59:38 -04:00
0xkite
0dafbed1e8
Initial Glove sandbox baseline 2026-07-19 21:06:11 -04:00