Add full Codex provider support across MAP workflows - #458
Conversation
|
Important Review skippedToo many files! This PR contains 283 files, which is 183 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (283)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… ungated; guardrail allowlist precedence Codex workflow-gate (.codex/hooks/workflow-gate.py): - Only Bash commands with an EXTRACTABLE write target (>, >>, tee, sed -i, cp/mv/install, dd of=, sort/yq -o, git --output) and apply_patch headers go through the phase gate; a command with no target is not gated — parity with the Claude twin and the documented azalio#164 limitation. The previous fail-closed classifier denied the orchestrator's own `VAR=$(python3 .map/scripts/...)`, `SUBTASK_ID=$(jq ...)` and `TEST_OUTPUT=$(pytest ...)` lines in RESEARCH / TEST_FAIL_GATE / DECOMPOSE and deadlocked $map-efficient and $map-tdd. - Targets are extracted per LINE, so a mutating second line can no longer hide behind a read-only first line (`echo hi\nsed -i ... src.py` was allowed). - `2>&1)` inside a `$(...)` capture is a descriptor, not a file target. - Unresolved targets (`> "$FILE"`, globs) stay denied outside editing phases. - step_state.json is read once per call; the writer tables live in one place. safety-guardrails.py: the sensitive-basename blocklist runs before the built-in safe prefixes (unchanged from the PR), but an EXPLICIT `safe_path_prefixes` list in .map/config.yaml now wins over the blocklist instead of being a dead toggle; the unreachable `is_safe_path` branch is gone. apply_patch header parsing is one shared partial (templates_src/_partials/apply-patch-paths.py.jinja) used by all four hooks; it accepts patch text or the hook tool_input mapping. memory/capture.py: real Codex rollouts store apply_patch as a custom_tool_call with a STRING input (or function_call with JSON arguments); both shapes now populate files_touched. pyproject.toml: mypy excludes only templates/map/scripts/ and the duplicate-basename templates/codex/ copies; pyright checks the whole templates/ tree again (100 -> 73 -> 93 files under mypy). install_manifest: .agents/references is a Codex scan root. Tests: explicit-target deny cases incl. multi-line, orchestrator-command allow cases across phases, opaque-command parity cases, guardrail override, real rollout capture shape, manifest references.
… hook ownership, hooks.json macro
- mapify_cli.codex_exec owns the `codex exec --json` argv and the JSONL event
fold; memory finalize, skill-eval dispatcher and the description proposer
all use it (finalize also gets --skip-git-repo-check, which the other two
already passed).
- mapify_cli.provider_registry is the one place that spells provider names
and their directories; validation sites, skill_dir lookups and
update_state._PROVIDERS derive from it; dispatcher_for() picks the
production dispatcher.
- `mapify _memory-hook`: finalize/recall helpers extracted, the composite
`session` action reuses them, one output path; the unused Codex
map-memory-finalize.py wrapper (never registered in hooks.json) is removed.
- codex_copier recognises MAP-owned hook registrations from the shipped
.codex/hooks/ listing instead of a hand-maintained 18-name list;
project-owned scripts in the same directory are preserved.
- hooks.json.jinja builds every registration through one launcher macro
(rendered output is semantically identical).
- map-architecture and map-auto Codex twins are `[% include %]`s of the
Claude source with PROVIDER-conditional frontmatter and command prefix;
rendered output is byte-identical; a test pins the mechanism.
- Codex memory hooks fall back to `python -m mapify_cli` when `mapify` is not
on PATH (new __main__.py); MAPIFY_CLI still wins.
- Dead `.removeprefix("$")` on the skill-eval marker removed; the HC-6
tracker reference in skill-eval run is replaced by the actual invariant.
…rict_sensitive_names) Default behaviour is back to what shipped before this PR: a file inside a safe directory (built-in prefixes or safe_path_prefixes) is trusted as-is, so src/config/secrets.yaml and tests/fixtures/credentials.json stay allowed on upgrade. `strict_sensitive_names: true` in .map/config.yaml opts a project into checking the sensitive-basename blocklist first, for Read/Edit/Write and Codex apply_patch alike; in strict mode safe prefixes never mask a sensitive name. Tests cover the default parity paths, strict-mode denies inside safe prefixes, and strict mode ignoring an explicit prefix list. CHANGELOG/USAGE updated.
No description provided.