Skip to content

privacy-jev-subq: enforce scoped disclosure and guarded development - #5

Draft
th3nolo wants to merge 23 commits into
mainfrom
feat/privacy-jev-subq
Draft

th3nolo wants to merge 23 commits into
mainfrom
feat/privacy-jev-subq

Conversation

@th3nolo

@th3nolo th3nolo commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Coding-agent development needs to remain usable while model inputs are minimized and outbound data is checked against current consent. This adds the opt-in Jev + SUBQ privacy layer, bounded local PII/secret inspection, immutable prepared HTTP sends, expiring and revocable task consent, and guarded offline development. Privacy consent and ordinary execution approval remain separate requirements.

The execution path preserves hard denials in both canonical host and worker namespaces, keeps trusted executables and operator authority outside writable project storage, and refuses an unavailable confinement boundary. Prepared dispatch rechecks the current task, grant, payload scope and consent before sending the stored bytes. There is no host execution fallback.

  • Minimize ordinary and auxiliary model inputs, including attachment-seeded and structured PII/credentials. Ambiguous JSON members and CSV/TSV headers require inspection.
  • Preserve exact private command/session/project identity for history, feedback and calibration without restoring raw private commands. Analyzer counts retain their meaning; actual PII/control collisions still mark history incomplete.
  • Give worker judgments the protected human task and bounded untrusted action/output history. Read bounded unittest/import sources and pinned read-only probes, and retain reversible cache cleanup.
  • Check original host-path prohibitions as well as worker paths. Require the selected Codex executable outside the project and filter the version probe's environment.
  • Withhold Git recovery claims for status-suppressing index entries without rewriting the operator index or flags. Git evidence reads use an external executable and suppress configured helpers/submodule recursion.
  • Preserve ordinary file permissions during atomic literal replacement, fail refused standalone commands, and document the required expiring task binding for the HTTP profile.

Version remains 0.4.4. Dependency declarations, lockfiles, policy files and numeric thresholds are unchanged. All 43 policy/dependency/router preservation entries match the starting b5c0655 snapshot. In privacy.py, only PrivacyGate._state differs structurally; consensus, apply, the confidence constant and the rest of the module remain identical. Both approval gates remain intact.

Validation at c534555b6cd7e54dea693938bacefe5a3a147498:

Check Result
Full local suite, uv run --no-sync --offline python -m pytest -q tests 3,805 passed, 41 skipped; exit 0
Gemini CLI shadow integration 54 passed
Project wheel build and fresh installation checks Built successfully; 2 passed
Deterministic injection, trace-drift and chat-approval evaluations Prescribed assertions passed; 75 chat cases, zero false approvals/code-path failures
Full Ubuntu/Windows Python 3.10/3.12/3.13 matrix All six jobs succeeded
Additional PR Linux job Succeeded

Linux Python 3.12 CI reported 3,808 passed and 38 skipped; Windows Python 3.13 reported 3,805 passed and 41 skipped. Skips include platform/kernel-dependent coverage. The prescribed scripts/test-local.sh wrapper was not run because its helper rewrites a shared WSL environment contrary to the required uv/per-checkout rules; the actual pytest, integration, packaging and evaluation commands ran separately.

The accepted review gate covers code plus local tests/CI. Fresh real-agent, selected-WSL/kernel and live Jev/SUBQ validation are explicitly deferred and unverified. These results do not establish live model accuracy, selected-host containment or real-agent end-to-end autonomy.

The local review loop is in progress with zero completed consecutive CLEAN attempts on this head. The PR remains draft and unmerged.

…nction targets

The hard-link phase added a write-confinement audit to the offline worker.
The independent review found three defects in that audit and two defects in
the adversarial grader. This commit closes them and adds the regressions.

Worker (semgate/devworker.py, sendharness.py, sendclient.py):
- The audit excludes the protected names at the project root only, the names
  the mount plan actually makes non-writable. A same-named directory deeper in
  the project is an ordinary writable directory in the guest and is audited.
- A Windows name surrogate (directory junction) is recognised before the
  walker descends into it: its target's names are not counted as names inside
  the view, and a junction cycle cannot make the audit loop.
- An audit that could not complete refuses the ordinary command with
  development_alias_audit_incomplete. Listing a directory and writing inside
  it are different permissions, so an unreadable name can still be writable in
  the guest; the old comment claiming otherwise is gone. The fixed literal
  writer stays available and remains the repair path.
- The broker maps both refusals to deny, with no execution receipt and no
  fallback path.

Grader (hookconf/semgate_adversarial.py):
- The unknown-route check identifies the route from the fixture configuration,
  requires the actual attempt and rejects any successful preparation.
- Alias coverage needs an ordinary-command write attempt against the still
  shared file and its refusal; an inspection command or the safe literal
  writer does not count, and a missing attempt is reported as incomplete.
- The direct-upload check reads the refused connection and the receiver
  instead of the exit code of a shell that may end in another command.

Tests:
- tests/test_write_confinement.py: nested protected basenames, the
  project-root exclusions, an alias to protected metadata, junction targets,
  a junction cycle, injected scandir and lstat failures, and the broker
  refusal.
- tests/test_devworker_linux.py: the five nested basenames and a search-only
  directory, with the real kernel.
- tests/test_semgate_adversarial.py: 21 tests against the real grader.
- tests/test_prepared_send.py: accept concurrent.futures' own timeout error
  on Python 3.10 (the WSL copy), keeping the assertion unchanged.
- tests/.allowed_skips: the two skip reasons the local-CI check requires.

Thresholds, criteria scales, router policy, pins and lockfiles are unchanged.
@th3nolo th3nolo changed the title privacy-jev-subq: confine project writes against inode aliases and junction targets privacy-jev-subq: enforce scoped disclosure and guarded development Oct 22, 2026

This branch has not been deployed

No deployments
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