Skip to content

fix(cron): scope approval context to each job - #2

Closed
thaingo72-ctrl wants to merge 2 commits into
mainfrom
fix/cron-context-isolation-noreply-20260730
Closed

fix(cron): scope approval context to each job#2
thaingo72-ctrl wants to merge 2 commits into
mainfrom
fix/cron-context-isolation-noreply-20260730

Conversation

@thaingo72-ctrl

Copy link
Copy Markdown
Owner

Summary

  • replace the process-global cron-session marker with ContextVar state
  • propagate it through cron worker contexts and reset the token in finally
  • suppress stale env fallback for bound gateway sessions while preserving standalone cron compatibility
  • make cron deny policy authoritative for terminal, execute_code, and plugin escalation paths

Current-main manual port of the reviewed behavior in upstream PR NousResearch#58663. Tree-identical to superseded fork PR #1; this PR uses GitHub noreply commit attribution.

Verification

  • RED: 12/12 new regressions failed on unpatched main
  • GREEN: 442 cron/affected approval tests passed
  • Ruff, compileall, and diff checks passed
  • two independent security/concurrency reviews: PASS

No state, credentials, identifiers, plugins, skills, or production configuration are included.

@thaingo72-ctrl

Copy link
Copy Markdown
Owner Author

Superseded by the tree-identical final-attribution branch plus the shell-snapshot integration fix.

@thaingo72-ctrl
thaingo72-ctrl deleted the fix/cron-context-isolation-noreply-20260730 branch July 30, 2026 09:57
thaingo72-ctrl pushed a commit that referenced this pull request Aug 2, 2026
… a broken chat

A completely unconfigured install previously booted into a working-looking
chat (banner showed model 'unknown'), accepted a message, spun ~30s, then
failed with 'Set OPENROUTER_API_KEY' — a provider the user never chose —
and never offered setup.

- HermesCLI.run() now probes provider readiness at startup (TTY only) and
  offers the shared provider picker (hermes model flow, which fronts Quick
  Setup / Nous Portal OAuth) when nothing is configured. Decline is
  respected; picker state re-syncs into the live CLI so the next turn works
  without a restart.
- New silent probe _runtime_credentials_ready(): no printing, no state
  mutation; handles keyless local endpoints and callable bearer providers.
- The empty-api-key error is provider-aware: names the actual resolved
  provider and points at 'hermes model' / 'hermes setup' instead of
  hardcoding OPENROUTER_API_KEY.
- Banner: unconfigured installs render 'no model configured — run /model'
  in red instead of the silent 'unknown' model slug.

Consumer-onboarding audit finding #2 (sev 5), Aug 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.

1 participant