Repository navigation
cog-build: default profile to max-build, expose profile input - #304
Conversation
The cog was running with PasClaw's stock TConfig defaults --
everything off. For unattended build runs that's the wrong default;
max-build is the profile designed for exactly this use case.
Two changes:
1. SEED `"profile": "max-build"` IN THE COG'S CONFIG.
The PasClaw config layer's profile-selection precedence
(PasClaw.Config.LoadConfig) is:
1. --profile CLI flag (the cog doesn't pass this)
2. PASCLAW_PROFILE env var (we don't set it)
3. "profile" field in config.json <-- now we set this
4. None
Predict.py now writes `"profile": "<input value>"` into the seeded
config.json. PasClaw resolves the profile (including _inherits
chains -- max-build inherits from low-token) before applying our
explicit fields, so the cog's `checkpoints_enabled`, sandbox
config, provider catalog etc. still win where they conflict.
2. EXPOSE `profile` AS A COG INPUT.
profile: str = Input(default="max-build", description="...")
Operator can override:
* "max-build" -- default. web_fetch / web_search / vector_search
/ auto_router / prompt_cache / promptware /
self-improving-skills / vault / 16 KB
tool_output_cap / task-aware memory orientation
all on.
* "baseline" -- everything off. A/B reference.
* "low-token" -- cheaper, smaller context window.
* "security" -- workspace restrict + shell deny + private-net
block; promptware on; web_fetch + vault off;
agent-authored skills stage for approval.
* "all-on" -- inherits max-build + every remaining boolean.
* "" -- skip profile application entirely.
The cog's launch-log line gained a `profile=...` field so the
operator can see which profile is active in the prediction's logs.
README documentation:
* New row in the Inputs table for `profile`.
* "Profile defaults" subsection enumerating what max-build turns
on (web_fetch / web_search / vector_search / auto_router /
prompt_cache / promptware / self-improving-skills / vault /
16 KB output cap / task-aware memory) and the other four built-
ins. Links back to docs/configuration.md#profiles for the full
contract.
No Pascal-side changes. Profile machinery (PR #291) handles
everything; the cog is just opting into it via a config field
that's been there since that PR shipped.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0066f1a259
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # through unchanged for baseline / low-token / security / etc. | ||
| profile_normalised = profile.strip() | ||
| if profile_normalised: | ||
| config_data["profile"] = profile_normalised |
There was a problem hiding this comment.
Honor security profile overrides
When a prediction passes profile="security", this only writes the name into config.json, and LoadConfig applies the profile before applying that same config file again. The config_data sandbox block in this function then explicitly sets restrict_to_workspace=False, allow_read_outside_workspace=True, and block_private_networks=False, so users selecting the new security option still get the permissive cog sandbox rather than the advertised hardening. Gate or omit those sandbox fields for the security profile, or set them to the security values.
Useful? React with 👍 / 👎.
| "defaults. `max-build` (default) turns on web_fetch, " | ||
| "web_search, vector_search, auto_router, prompt_cache, " |
There was a problem hiding this comment.
Stop claiming max-build enables web_search
For default predictions without separate PASCLAW_* search credentials or a web_search config block, the agent will not register web_search: NewBuiltinRegistry gates it on HasConfiguredWebSearchProvider(Cfg), while the max-build profile only enables web_fetch/vault/vector/etc. and this cog-generated config only writes LLM provider entries. The new input description advertises web_search as part of the default toolset, so callers following the default will still be missing that tool unless they configure search out of band.
Useful? React with 👍 / 👎.
…y sandbox Codex P2 review on PR FMXExpress#304, both findings legit: FINDING 1 -- predict.py:295-296: the profile input description claimed `max-build` enables web_search. The flag IS in the max-build profile, but tool registration is gated on HasConfiguredWebSearchProvider in NewBuiltinRegistry. The cog only writes LLM provider entries, no web_search.provider block, so the tool never registers. A caller following the default sees no web_search even though the description advertises it. Fix: rewrite the description to call out web_fetch as the real available tool, and explicitly note that web_search needs an out-of-band search-provider config which the cog doesn't supply. Same edit in cog-build/README.md's "Profile defaults" section. FINDING 2 -- predict.py:455-463: the seeded config_data explicitly set sandbox.restrict_to_workspace=False, allow_read_outside_ workspace=True, block_private_networks=False. PasClaw's LoadConfig applies the profile BEFORE the config file, so these fields overrode whatever the profile chose -- including security's hardening. profile=security operators got the permissive cog sandbox, not the advertised hardened one. Fix: drop the sandbox block from config_data entirely. PasClaw's TConfig defaults RestrictToWorkspace := False AllowReadOutsideWorkspace := False ShellDenyEnabled := True BlockPrivateNetworks := True are already appropriate for a cloud container -- two cog fields were even more permissive than the defaults (AllowReadOutsideWorkspace + BlockPrivateNetworks), which weren't strongly motivated to begin with. With the block gone: * profile=max-build / baseline / low-token / all-on: inherit TConfig defaults (sandbox permissive enough to operate, shell deny on, internal-IP block on). * profile=security: profile's hardening (restrict_to_workspace= True, allow_read_outside_workspace=False, block_private_ networks=True, etc.) wins as intended. * profile="" (skip): TConfig defaults. Comment block above config_data names Codex P2 PR FMXExpress#304 so a future contributor doesn't "clean up" and re-introduce the override. README "Profile defaults" subsection also explicitly documents the no-sandbox-seed choice + names the inherited TConfig values for clarity. No Pascal-side changes.
The README + docs/changelog.md last entry was 2026-06-13 (FMXExpress#244). Five substantial PRs (FMXExpress#314 FMXExpress#315 FMXExpress#316 FMXExpress#317 FMXExpress#318) and ten more feature PRs between them and that entry shipped without changelog entries. This brings both files current through today. Twenty new entries (newest first, matching the existing style): 2026-06-21 FMXExpress#318 Relay pull-worker provider (queue + provider + /v1/relay/* HTTP) 2026-06-20 FMXExpress#317 pasclaw plan + build PLAN.md pickup + build --goal + cog mode FMXExpress#316 Cloudflare AI Gateway provider catalog rows FMXExpress#315 MCP progressive disclosure + tool_search FMXExpress#314 Stock defaults adopt lean-edit shape; fs_grep split-gate 2026-06-18 FMXExpress#312 Web UI workspace.zip export + import FMXExpress#310 Model-callable cron tool FMXExpress#309 FTS5 snippet window widened 24 -> 60 FMXExpress#307 Windows cmd.exe quoting fix 2026-06-17 FMXExpress#306 cog-build honours profile=security sandbox FMXExpress#304 cog-build default profile = max-build FMXExpress#303 cog-build list[Path] outputs + Secret inputs + -q 2026-06-16 FMXExpress#302 cog-build optional workspace_in FMXExpress#300 pasclaw build cmd + cog-build/ predictor (parent feature) FMXExpress#299 Checkpoints zpaq backend + /redo FMXExpress#298 AGENTS.md + pasclaw init + /init FMXExpress#297 tool_choice force-a-specific-tool form FMXExpress#296 Delphi ExtraEnv injection fix FMXExpress#295 KB native PDF ingest 2026-06-15 FMXExpress#292 pasclaw profile diff + bench Skipped per the changelog's stated convention ("Bug fixes and review follow-ups are in the full git log"): FMXExpress#293 cmd/profile dcc64 fix FMXExpress#294 skills_manage gemini empty-enum fix FMXExpress#301 cmd.build dcc64 fix FMXExpress#311 cron dcc64 fix Files updated identically (the docs/changelog.md note at the top says "This file mirrors the changelog section at the top of the root README.md"): M README.md 20 entries + 20 link refs added M docs/changelog.md same The link-ref block at the bottom of each file gained 20 [#NNN] entries keeping the existing one-per-line / sorted-numerically format.
Summary
The cog-build predictor was running PasClaw with stock
TConfigdefaults — everything off. For unattended build runs that's the wrong default;max-buildis the profile PR #291 designed for exactly this use case.Two changes:
1. Seed
"profile": "max-build"in the cog'sconfig.jsonPasClaw's profile-selection precedence (
PasClaw.Config.LoadConfig):--profileCLI flag (cog doesn't pass this)PASCLAW_PROFILEenv var (we don't set it)"profile"field in config.json (now we set this)PasClaw resolves the profile (including
_inheritschains —max-buildinherits fromlow-token) before applying our explicit fields, so the cog'scheckpoints_enabled, sandbox config, and provider catalog still win where they conflict.2. Expose
profileas a cog inputOperator can override to any built-in:
max-build(default)web_fetch,web_search,vector_search,auto_router,prompt_cache,promptware, self-improving-skills, vault,tool_output_cap=16384, task-aware memory orientation — all onbaselinelow-tokensecurityweb_fetch+ vault offall-onmax-build, flips every remaining boolean. Surface-area testing only.Launch-log line gained a
profile=...field so it's visible in Replicate's prediction logs.Files
Test plan
python3 -c "import ast; ast.parse(...)"— syntax OKcog pushand verify the launch-log line showsprofile=max-buildweb_search/web_fetchtools are available to the model (max-build turns them on)profile=baselineand verify those tools fall back offNo Pascal-side changes. The profile machinery has been in PasClaw since PR #291; the cog is just opting into it via a config field that's been there since that PR shipped.
Generated by Claude Code