← Назад к задаче

r15a-dev-safety-review.md

FACTORY_OUTCOME: COMPLETED

Сводка для владельца

Итог: FAIL полного B1–B4 gate; независимая проверка завершена, PROD не активирован.
Проблемы: отсутствующий явно заданный routing-config отключает защиту; manifest пропускает лишние symlink; динамическая sandbox-проверка запрещена текущей средой.
Решение: оставить активацию закрытой; R1.5b продолжать только как изолированную доработку и повторную проверку. ABC/rollback остаются задачами 262/263.

Scope and identity

Reviewed 2026-11-30: task-261 report review/r15a-dev-safety.md (its internal heading says “task 260”), task-260 findings in review/r15-dev-isolation-review.md, exact DEV tag dev-baseline-3-r15a-final-unverified, commit 2961037e8028c8538b2b3a434b1dd80e6ac47043, and portable routing patch. DEV working tree was clean before/after inspection. No source repairs, real agent CLI execution, successful network operation, service restart, activation, production DB access or writes were performed. This report is the only PROD write; fixtures, dependency mutations and patch applications were confined to /tmp/r15a-review-0jem3sgz.

Overall FAIL means acceptance evidence/requirements remain incomplete, not that every control failed. Task 261's historical 9/9 boundary checks and 15/13/4 baseline failures are reported evidence, not independently reproduced results here. No ABC or rollback verdict is issued.

B1–B4 verdict

GateVerdictIndependent assessment
B1 environment/mount/socket isolationFAIL acceptance; static design PASSRunner uses cleared environment, bwrap --unshare-all --clearenv, minimal mounts, private /tmp, read-only dependencies, masks Node/node_modules, excludes host home/runtime paths. The actual runner exited 1 before payload: bwrap: loopback: Failed to create NETLINK_ROUTE socket: Operation not permitted. Thus host socket invisibility, environment stripping, namespace networking and disposable-write isolation were not dynamically established here. No flags were removed and no broad tests were run outside it.
B2 fake aliases/direct entry points and real-mocked tierPASS scoped fake-routing checks; real-mocked boundary unverifiedBuiltins, registered aliases, legacy loader and direct real executor/provider run entry points are covered by fail-closed routing/guards. Missing fake directory/module, invalid mode and conflicting hints reject. Real-mocked suites explicitly turn real mode on; safety then depends on the OS sandbox, not forbid_real. Full dispatcher/executor suites were therefore not rerun.
B3 portable Factory workspace routingFAIL full fail-closed contract; placement cases PASSMissing/default-disabled config preserves legacy behavior; enabled routing handles canonical paths, overlap and symlink escape, parks outside/PROD paths without creating executions, and checks the effective executor again on retry/fallback. However, an explicitly configured missing file silently disables routing and restores legacy code-root placement. No PROD routing is active or implied by this review.
B4 disposable state/dependency attestationFAIL exact attestation; disposable design PASS staticallySource is copied to a fresh temp snapshot; .git, ignored DB/state and host checkout are not mounted writable. Runtime disposal remains dynamically unverified because bwrap could not start. All 2,626 regular dependency files verify, content tamper exits 3, but an extra symlink is accepted with exit 0. requirements.lock exists on the DEV host but is ignored by *.lock and absent from the reviewed tag.

Concrete findings and trusted-agent suitability

  1. Explicit configuration disappearance fails open. control_plane/workspace_routing.py::_config returns None for any nonexistent path, including AI_FACTORY_DEV_ROUTING_FILE. With that variable pointing at a missing file, a fresh codex claim receives dispatcher ROOT. Distinguish intentionally absent default config (required compatibility) from missing explicitly selected policy. Invalid JSON is correctly parked; typoed executor/project allowlists can also intentionally or accidentally exclude tasks, so configuration validation and scope review matter. The supplied policy is placement-only for selected executors/projects, not a universal Factory gate.
  2. Manifest does not attest the full dependency tree. dev_tools/deps/verify.sh enumerates only find . -type f; adding .deps/review_extra_alias.py -> typing_extensions.py on a disposable copy leaves verification green. Actual DEV had zero dependency symlinks at review time; no existing compromise is alleged. Reject unexpected nonregular entries or attest their types/targets. The content-hash manifest is useful, but the ignored lock file is not a reproducible tagged dependency artifact. Host /usr and system Python are also outside that manifest.
  3. Aggregate status is substantially repaired, with one edge gap. A separate harness-only fixture exercised the unchanged aggregation script using synthetic runner output: passing=0, exact baseline failures=1, new failures=2, runner error=2. Actual bwrap failure produces aggregate=2. However, runner exit 0 with no summary yields aggregate=0 because the script accepts rc=0 before checking the summary. This contradicts the report's blanket missing-summary guarantee; it is not evidence that ordinary pytest failures are hidden. No sandbox was replaced or weakened for actual tests.
  4. cwd is not OS confinement. Dispatcher passes the selected path through WORKSPACE/WORKDIR and executor cwd. This patch creates no filesystem permissions, credential boundary or sandbox for a real agent; absolute paths, child processes and host-user rights remain governed elsewhere. Existing PROD-workspace tasks are parked, not silently migrated, when routing is enabled. They need explicit migration/review before a pilot, not blanket workspace rewriting.

For trusted internal agents, a verified disposable OS sandbox plus sanitized env and fake routing is a proportionate test-harness design. Pytest hooks are supplemental accidental-call protection, not an adversarial boundary: allowed Python/shell children, other process/socket APIs, or hook replacement can bypass those hooks. DEV_EXEC_MODE=real is defensible only inside the working OS boundary. The portable routing patch is useful operational placement, but cannot by itself justify unattended real-agent access to the host. A hostile-code isolation standard is not imposed here; the remaining issues are concrete policy/attestation defects and missing verification, even under the trusted-agent model.

Independent tests and applicability evidence

Routing test targetResultTime
Final DEV tag copy23 passed / 14 subtests, exit 0109.35 s
Current PROD copy + portable patch23 passed / 14 subtests, exit 076.52 s
Pristine copy + portable patch23 passed / 14 subtests, exit 090.17 s

Counts include the original nine cases collected twice (imported class and inherited class), plus five independent cases; they are not 23 distinct scenarios. Custom executor allowlist behavior was characterized, not classified as an isolation defect merely because it permits nonlisted executors.

Evidence retained temporarily under /tmp/r15a-review-0jem3sgz: setup.json, harness.json, test_review_routing.py, run_offline.py, probe_harness.py, dev-tests.log, {dev,prod,pristine}-independent.log, sandbox-probe.log, deps-content-tamper.log, guard-alias-offline.log, aliases-offline.log. These paths are local review evidence, not durable release artifacts. Key SHA256:

Reproduction: export the named tags into disposable directories; copy manifest-listed PROD files into a separate directory; git apply --check then apply the patch there. Run only inspected claim/fake tests using env -i, PYTHONDONTWRITEBYTECODE=1, PYTEST_DISABLE_PLUGIN_AUTOLOAD=1, the attested dependency directory in PYTHONPATH, and python3 -m pytest -p no:cacheprovider. Full suites and real-mocked tests require the unchanged OS sandbox to start successfully first. The shipped verify_sandbox.sh was not invoked: it mutates dependencies and includes outbound probes; only a no-network payload was submitted to the unchanged runner on a disposable copy.

R1.5b handoff

Do not mark this tag stable or activate PROD. Before positive safety acceptance: distinguish missing explicit policy from default opt-out; attest/reject symlink and other unexpected dependency entries and include the lock artifact in the intended release; align aggregate missing-summary handling with its contract; independently rerun environment/mount/socket/disposable-write checks and mocked-tier tests on a host permitting the unchanged sandbox. Review configured executor/project coverage and already-stored PROD workspaces before any separately authorized placement pilot. Do not promote DEV HEAD wholesale: it contains hardcoded DEV paths and test-only guards. ABC (262) and rollback (263) remain separate gates and were neither repaired nor waived here.

Материалы