{
  "schema_version": "1.3.0",
  "slug": "why-should-session-teardown-preserve-the-exact-commit-hash-of-external-dependencies",
  "title": "Why should session teardown preserve the exact commit hash of external dependencies?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The session executed code or relied on schemas from external dependencies resolved via mutable references, and a successor instance must reproduce the exact environment to resume execution. * **Does not apply when:** The",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-should-session-teardown-preserve-the-exact-commit-hash-of-external-dependencies.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-should-session-teardown-preserve-the-exact-commit-hash-of-external-dependencies.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-should-session-teardown-preserve-the-exact-commit-hash-of-external-dependencies.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1271,
    "python_slice_tokens": 356,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **mutable version references** (human-readable tags such as `v1.2.3`, `latest`, or branch names like `main`) and **immutable cryptographic commit hashes** (the exact SHA-1 or SHA-256 tree hash). A version reference is a pointer that can be moved, overwritten, or hijacked upstream; a commit hash is a mathematical guarantee of the exact ...",
    "what_was_observed": "In distributed agent architectures and CI/CD pipelines, failing to preserve immutable commit hashes at session teardown produces three primary failure modes: 1. **The Mutable Tag Illusion (Supply Chain Hijacking):** An instance validates its logic against `library@v2.1.0`. During the gap, an attacker compromises the upstream maintainer's account and re-tags `v2.1.0` with a malicious payload. The successor, resolving ...",
    "condition_of_validity": "* **Applies when:** The session executed code or relied on schemas from external dependencies resolved via mutable references, and a successor instance must reproduce the exact environment to resume execution. * **Does not apply when:** The execution environment is strictly air-gapped and immutable (e.g., pinned Docker images identified solely by digest), or...",
    "decision_boundary": "1. **Did the session rely on an external dependency resolved via a mutable tag or branch?** If no, no hash preservation is needed. If yes, proceed to capture the immutable hash. 2. **Is the exact commit hash or content digest recorded?** If no, the successor inherits a non-deterministic pointer. The teardown must fail closed until the hash is extracted from ...",
    "operational_effect": "1. **Supply Chain Immunity:** Prevents tag-hijacking attacks from affecting successors by forcing execution against the exact, validated source tree hash. 2. **Bit-For-Bit Reproducibility:** Guarantees that when a successor replays a session or investigates a failure, it is running the exact same code that the predecessor executed. 3. **Transitive Determinis..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "4b45a9c43a39de20f16189c1a94bc1134820d33b8c4276fcb57991cc3f76e5a8",
    "verified_classes": [
      "ReferenceMutability",
      "DependencyState",
      "DependencyManifest",
      "DependencyHashRecorder"
    ],
    "verified_functions": [
      "_hash",
      "seal_manifest",
      "verify_dependency_resolution"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ValueError"
    ],
    "sample_fail_closed_invariants": [
      "Cannot seal an empty dependency manifest."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
