Skip to content

fix(cron): honor profile wrap_response during delivery - #3

Closed
mzkarami wants to merge 4 commits into
mainfrom
auto/nightly-cron-wrap-response-profile-20260601
Closed

fix(cron): honor profile wrap_response during delivery#3
mzkarami wants to merge 4 commits into
mainfrom
auto/nightly-cron-wrap-response-profile-20260601

Conversation

@mzkarami

@mzkarami mzkarami commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • read cron.wrap_response from a cron job's runtime profile during delivery
  • preserve scheduler-profile storage/output behavior by scoping only the config lookup
  • add a regression test for profile jobs delivering raw output when their profile sets wrap_response: false

Test Plan

  • uv run --extra dev pytest tests/cron/test_cron_profile.py tests/cron/test_scheduler.py::TestDeliverResultWrapping -q
  • uv run --extra dev ruff check cron/scheduler.py tests/cron/test_cron_profile.py
  • git diff --check

Refs NousResearch#36248

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

🔎 Lint report: auto/nightly-cron-wrap-response-profile-20260601 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9578 on HEAD, 9577 on base (🆕 +1)

🆕 New issues (1):

Rule Count
unresolved-import 1
First entries
tests/gateway/test_undo_rewind_session.py:13: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`

✅ Fixed issues: none

Unchanged: 4962 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

teknium1 and others added 4 commits June 1, 2026 01:58
…p menu (NousResearch#36227)

The setup-mode chooser showed two bare labels ('Quick Setup (Nous
Portal) — OAuth login, model & messaging' / 'Full setup — configure
everything') that didn't explain what Quick Setup actually is. Expand
both labels inline so each choice line carries a concise explanation:

  Quick Setup (Nous Portal) — free OAuth login, no API keys, model + tools
  Full setup — configure every provider, tool & option yourself (bring your own keys)

Single-file change to the choice labels; no new plumbing.
…gnore files (NousResearch#36231)

The skill security scanner blocked legitimate community skills on three
intrinsic false-positive patterns:

- read_secrets_file matched `cat > file.env <<` heredocs (writing the
  user's own keys into their own local .env), not just `cat file.env`
  reads. Exclude output redirections.
- allowed-tools frontmatter is REQUIRED by the agent-skill spec; every
  compliant skill declares it. Drop from HIGH privilege_escalation to a
  LOW informational finding so it no longer drives the verdict.
- python_os_environ flagged `os.environ.get("CONFIG_VAR")` config reads
  as HIGH exfiltration. Exempt non-secret `.get()` reads; add a dedicated
  CRITICAL python_environ_get_secret pattern so secret-named reads
  (OPENAI_API_KEY etc.) are still caught.

Also: scan_skill() now honors a skill-provided .skillignore / .clawhubignore
(gitignore-style) so dev/docs artifacts shipped in a skill root are excluded
from both structural checks and pattern scanning. SKILL.md is never ignorable.

80 tests pass (64 existing + 16 new).
…I/TUI) (NousResearch#36699)

Gateway /undo was wired into every platform but still ran the old
single-turn hard-truncate. Now it matches the CLI/TUI: /undo [N] backs
up N user turns (default 1, clamps to oldest), soft-deletes the
truncated rows on disk (active=0, kept for audit, hidden from re-prompts
and search) via SessionDB.rewind_to_message, evicts the cached agent so
the next turn rebuilds from the active-only transcript (the gateway's
equivalent of the CLI's in-place history surgery + memory invalidation),
and echoes the backed-up message text so the user can copy/edit and
resend — platforms have no editable composer to prefill.

- gateway/session.py: SessionStore.rewind_session(session_id, n) wraps
  the soft-delete primitive; load_transcript already returns active-only
- gateway/run.py: _handle_undo_command parses [N], calls rewind_session,
  evicts the agent, echoes target text; confirm-prompt detail is count-aware
- locales: undo.removed gains {turns}; new undo.invalid_count, all 16 langs
- tests: tests/gateway/test_undo_rewind_session.py (6 cases)
@mzkarami
mzkarami force-pushed the auto/nightly-cron-wrap-response-profile-20260601 branch from 1ee762d to 1f20f80 Compare June 1, 2026 09:09
@mzkarami mzkarami closed this in fc086da Jun 10, 2026
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.

2 participants