{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-taint-labels-across-a-fork-when-the-child-inherits-capability-scopes-but-not-the-parent-s-egress-budget",
  "title": "How should an instance reconcile taint labels across a fork when the child inherits capability scopes but not the parent's egress budget?",
  "date_of_record": "2026 November 18",
  "scope": "Applies to taint-tracking sandboxes that attach capability scopes (syscall allowlists, egress destinations, byte/time budgets) to tool-call invocations and propagate taint labels across process or task forks. Does not apply to single-process interpreters without fork/exec, nor to sandboxes where taint is advisory-only and never gates egress.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-taint-labels-across-a-fork-when-the-child-inherits-capability-scopes-but-not-the-parent-s-egress-budget.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-taint-labels-across-a-fork-when-the-child-inherits-capability-scopes-but-not-the-parent-s-egress-budget.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-taint-labels-across-a-fork-when-the-child-inherits-capability-scopes-but-not-the-parent-s-egress-budget.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1767,
    "python_slice_tokens": 318,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious invariant is this: **a taint label and a capability scope are orthogonal axes, but every egress decision is a function of their join.** A fork inherits the capability scope (the file descriptor table, seccomp filter, and egress allowlist are copied by the kernel) but *does not* inherit the taint label, because taint lives in the sandbox super...",
    "what_was_observed": "In a sandbox running tool calls as forked subprocesses under a seccomp-notify supervisor, a tool that read from a tainted source (a document classified `UNTRUSTED_DOC`) forked a worker to parse it. The parent task carried taint `{UNTRUSTED_DOC}` and an egress scope permitting only `telemetry.internal:4317` with a 64 KiB budget. The child, observed 12 ms after `clone(2)`, was registered by the supervisor with taint `{...",
    "condition_of_validity": "The invariant \"child authority ⊆ parent authority at fork time, and child obligations ⊇ parent obligations at fork time\" holds *only* if the supervisor performs an atomic fork-time snapshot: it must read the parent's taint set and remaining budgets, write them to the child's task record, and install the child's seccomp filter in a single step that completes ...",
    "decision_boundary": "Choose **fork-time atomic snapshot** when the sandbox admits any tool that forks (parsers, shell pipelines, build steps) and taint can ever gate egress. The cost is a stop-the-world handshake per fork — measured at 40–90 µs on the reference host, dominated by the `PTRACE_EVENT_STOP` round trip. Choose **cgroup-keyed BPF lookup** when fork rate is high enough...",
    "operational_effect": "After the fix, the sandbox denies the 3.1 KiB egress with `EPERM` at `connect(2)` and attributes it to the child's inherited `{UNTRUSTED_DOC}` label, which is what the operator needs to see. The fork handshake adds 40–90 µs per tool-call fork; at the observed 400 forks/s peak this is under 4% of wall time and was accepted. The budget-conservation change elim..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "bf9e56712f1d10bc8fecb31b45b69fa0989505150cc4751769892b445da136bd",
    "verified_classes": [
      "TaintForkInvariantError"
    ],
    "verified_functions": [
      "snapshot_child"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TaintForkInvariantError"
    ],
    "sample_fail_closed_invariants": [
      "no parent record; taint lineage lost",
      "negative budget grant",
      "child taint is not a superset of parent taint",
      "child authority exceeds parent authority"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
