Skip to content

feat: add long-horizon context integrity - #96

Draft
douglas-grishen wants to merge 1 commit into
codex/capability-state-fusion-v1from
codex/long-horizon-context-integrity-v1
Draft

feat: add long-horizon context integrity#96
douglas-grishen wants to merge 1 commit into
codex/capability-state-fusion-v1from
codex/long-horizon-context-integrity-v1

Conversation

@douglas-grishen

Copy link
Copy Markdown
Contributor

Summary

  • add the public, provider-neutral @agentplat/inference-control/context-integrity entrypoint with strict content-free contracts, canonical digests and a deterministic longitudinal reducer
  • add bounded CAS state, rollback/equivocation detection, sticky degradation, recovery hysteresis and state handoff continuity
  • add explainable reference analysis plus conservative analyzer composition for hostile, stale, contradictory and uncertain context
  • physically filter withheld entries before controlled-model providers and Portable Agent adapters are invoked
  • project integrity state into role-alignment and capability-state inputs without granting role, assignment or effect authority

Safety and compatibility

  • additive and opt-in; existing executors and adapters preserve their behavior when the feature is absent
  • only admit and restrict items reach protected providers or adapters
  • partial context requires the exact policy-allowed filter implementation binding; otherwise evaluation fails closed
  • persistent state and handoff envelopes retain digests, revisions, bounded scores and reason codes, never original prompts, outputs or hidden reasoning
  • missing, expired, future, rolled-back, equivocated or malformed inputs fail closed
  • browser-safe and provider-neutral; no vendor SDK or Node built-in on public browser entrypoints

Validation

  • pnpm run build
  • pnpm run type-check
  • pnpm run test:unit — 839 tests, 0 failures (1 skipped, 6 todo)
  • focused context-integrity and public-catalog suite — 14 tests, 0 failures
  • pnpm run audit:public — 2,436 files, no secrets or restricted terminology
  • pnpm run verify:pack — 48 tarballs and 93 packed API surfaces verified through clean pnpm and npm consumers
  • bounded deterministic 10,000-step state scenario

Stack

This PR is intentionally based on codex/capability-state-fusion-v1 (#95) so its diff contains only Long-Horizon Context Integrity V1. Retarget to main after #95 lands.

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