Skip to content

Harden context handling end to end - #32

Merged
RNT56 merged 1 commit into
mainfrom
codex/harden-context-pipeline
Jul 18, 2026
Merged

Harden context handling end to end#32
RNT56 merged 1 commit into
mainfrom
codex/harden-context-pipeline

Conversation

@RNT56

@RNT56 RNT56 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • centralize context construction in a trust-aware canonical assembler across main chat, recursive agents, Watch, MCP sampling, Vault retrieval, cloud providers, and local MLX
  • enforce scoped cloud approvals, explicit provenance, untrusted evidence boundaries, atomic tool exchanges, and protocol-safe transcript repair
  • account conservatively for messages, attachments, tool schemas, hosted tools, structured output, completion reserves, and provider request options
  • harden MCP sampling limits, result disclosure, temporary attachment cleanup, and tool capability handling
  • preserve context lineage while excluding hidden internal rows from user-facing previews and search
  • add adversarial core and app regression coverage for privacy, budgeting, malformed transcripts, tool protocol, and provider fidelity

Root cause

Context construction had evolved independently across several product surfaces. Trust, privacy, token budgeting, transcript repair, and provider-specific request accounting could therefore drift or be bypassed depending on the entry point.

Impact

Every production inference path now uses one fail-closed assembly contract. Local-only or private context requires explicit per-turn approval before cloud egress, external evidence cannot become system instructions, malformed tool exchanges cannot reach providers, and requests fail clearly instead of silently clipping required user input.

Validation

  • 273 PinesCore tests passed across 17 suites
  • PinesCoreTestRunner passed
  • clean iOS Simulator build-for-testing passed
  • Pines app tests: 115 passed, 3 physical-device-only Metal probes skipped, 0 failed
  • public repository hygiene, privacy manifest, security boundary, workflow contract, secret-pattern, and generated-artifact checks passed
  • git diff --check passed

Centralize trust-aware context assembly and conservative request budgeting across chat, agents, Watch, MCP, Vault, cloud, and MLX.

Enforce scoped cloud approvals, protocol-safe tool exchanges, bounded MCP payloads, provider fidelity, context lineage, and hidden-context UI boundaries. Add adversarial core and app regression coverage.

Validated with 273 PinesCore tests, PinesCoreTestRunner, a clean iOS build-for-testing, 115 passing app tests with 3 device-only skips, and the public-hygiene suite.
@RNT56
RNT56 merged commit fdb788b into main Jul 18, 2026
13 checks passed
@RNT56
RNT56 deleted the codex/harden-context-pipeline branch July 18, 2026 18:02
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