revert(cron): remove per-job profile support (#28124)#43956
Merged
Conversation
Fully removes the cron per-job 'profile' arg added in #28124: the cronjob tool schema field, CLI --profile flags on cron create/edit, job-record storage/validation, the scheduler's _job_profile_context wrapper, and the script-runner env override. Sequential-partition logic reverts to workdir-only. The context-local HERMES_HOME override in hermes_constants and the subprocess bridging in tools/environments/local.py are kept — they now have other consumers (dashboard multi-profile, TUI gateway).
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-assignment |
1 |
First entries
gateway/platforms/api_server.py:707: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to `def create_job(prompt: str | None, schedule: str, name: str | None = None, repeat: int | None = None, deliver: str | None = None, origin: dict[str, Any] | None = None, skill: str | None = None, skills: list[str] | None = None, model: str | None = None, provider: str | None = None, base_url: str | None = None, script: str | None = None, context_from: str | list[str] | None = None, enabled_toolsets: list[str] | None = None, workdir: str | None = None, no_agent: bool = False) -> dict[str, Any]`
✅ Fixed issues (8):
| Rule | Count |
|---|---|
invalid-argument-type |
3 |
unresolved-import |
2 |
unresolved-attribute |
2 |
invalid-assignment |
1 |
First entries
gateway/platforms/api_server.py:707: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to `def create_job(prompt: str | None, schedule: str, name: str | None = None, repeat: int | None = None, deliver: str | None = None, origin: dict[str, Any] | None = None, skill: str | None = None, skills: list[str] | None = None, model: str | None = None, provider: str | None = None, base_url: str | None = None, script: str | None = None, context_from: str | list[str] | None = None, enabled_toolsets: list[str] | None = None, workdir: str | None = None, profile: str | None = None, no_agent: bool = False) -> dict[str, Any]`
tests/cron/test_cron_profile.py:12: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/cron/test_cron_profile.py:152: [invalid-argument-type] invalid-argument-type: Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["profile"]` on object of type `list[str]`
tests/cron/test_cron_profile.py:152: [invalid-argument-type] invalid-argument-type: Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["profile"]` on object of type `str`
tests/cron/test_cron_profile.py:266: [unresolved-import] unresolved-import: Cannot resolve imported module `dotenv`
tests/cron/test_cron_profile.py:202: [unresolved-attribute] unresolved-attribute: Unresolved attribute `AIAgent` on type `ModuleType`
tests/cron/test_cron_profile.py:152: [invalid-argument-type] invalid-argument-type: Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["properties"]` on object of type `str`
tests/cron/test_cron_profile.py:153: [unresolved-attribute] unresolved-attribute: Attribute `lower` is not defined on `dict[str, str]`, `dict[str, dict[str, str]]`, `list[str]`, `bool` in union `Unknown | str | dict[str, str] | ... omitted 3 union elements`
Unchanged: 5560 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
OutThisLife
added a commit
to xxxigm/hermes-agent
that referenced
this pull request
Jun 11, 2026
…-two-html5-backends Pick up cron profile revert (NousResearch#43956) so test shard 2 passes.
OutThisLife
added a commit
to xxxigm/hermes-agent
that referenced
this pull request
Jun 11, 2026
Cron per-job profile support was reverted on main (NousResearch#43956) but test_subcommands_cron still passed --profile work. Align the test with the current argparse surface.
This was referenced Jun 11, 2026
sitiouno
added a commit
to SiteOneTech/hermes-agent-original
that referenced
this pull request
Jun 11, 2026
…#28124) (NousResearch#43956)" This reverts commit 7d8d000.
OutThisLife
added a commit
that referenced
this pull request
Jun 11, 2026
Per-job cron profile support was reverted in #43956 but the extracted parser test still asserted --profile on create. Remove the stale flag so test slice 1 passes on current main.
OutThisLife
added a commit
to xxxigm/hermes-agent
that referenced
this pull request
Jun 11, 2026
Rename the fixture prompt so the test file blob is unambiguously new after NousResearch#43956 removed cron --profile; main still carried the old --profile assertion which broke slice 1 under the PR merge ref.
OutThisLife
added a commit
to xxxigm/hermes-agent
that referenced
this pull request
Jun 11, 2026
Avoid slice-1 CI repeatedly executing a stale cached copy of test_subcommands_cron.py (still asserting --profile after NousResearch#43956). The merge-ref tree is correct; renaming forces a fresh module path.
OutThisLife
added a commit
that referenced
this pull request
Jun 11, 2026
Slice 1 kept executing a cached copy of test_subcommands_cron.py that still asserted --profile after #43956 reverted per-job profile support, even though the merge-ref tree was correct. Rename the module and refresh the fixture prompt so CI collects the updated file.
OutThisLife
added a commit
that referenced
this pull request
Jun 11, 2026
Slice 1 kept executing a cached copy of test_subcommands_cron.py that still asserted --profile after #43956 reverted per-job profile support, even though the merge-ref tree was correct. Rename the module and refresh the fixture prompt so CI collects the updated file.
AIalliAI
pushed a commit
to AIalliAI/Hermes
that referenced
this pull request
Jun 11, 2026
Resolves conflicts in cron/jobs.py and cron/scheduler.py against the per-job profile revert (NousResearch#43956): keeps the _jobs_file_lock CRUD locking, the _EnvMutationGate cross-pool exclusion, and the gateway scheduler-owner deferral from this branch, while dropping all per-job profile support to match upstream. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fully reverts PR #28124 — removes the per-job
profilearg from cron entirely (tool schema, CLI flags, job storage, scheduler runtime override).Changes
tools/cronjob_tools.py: dropprofileschema field, function param, create/update plumbing, display fieldcron/jobs.py: drop_normalize_profile(), theprofilecreate param, stored field, and update validationcron/scheduler.py: drop_job_profile_context()and therun_jobwrapper (back to a singlerun_job), drop the script-runner env override, revert sequential partition to workdir-onlyhermes_cli/cron.py+hermes_cli/subcommands/cron.py: drop--profileoncron create/cron editand the Profile display linestests/: deletetests/cron/test_cron_profile.py, strip profile assertions fromtest_cron.py, fix stale commentswebsite/docs/user-guide/features/cron.md: remove the "Running cron jobs in a specific profile" sectionKept: the context-local
HERMES_HOMEoverride inhermes_constants.pyand the subprocess bridging intools/environments/local.py— they have other consumers now (dashboard multi-profile cron views, TUI gateway, copilot ACP client, code-exec tool).Legacy
jobs.jsonentries that still carry aprofilekey load fine; the field is simply ignored.Validation
cronjob(profile=...)profilefieldhermes cron create --profile472 targeted tests pass (tests/cron/, tests/hermes_cli/test_cron.py, tests/test_subprocess_home_isolation.py, tests/tools/test_cronjob_tools.py). E2E verified with real imports against a temp HERMES_HOME.
Reverts #28124.
Infographic