Skip to content

chore: synchronize fork main with upstream - #59

Merged
mrkillbob merged 7680 commits into
mainfrom
codex/fork-main-sync-20260907
Sep 8, 2026
Merged

mrkillbob merged 7680 commits into
mainfrom
codex/fork-main-sync-20260907

Conversation

@mrkillbob

@mrkillbob mrkillbob commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Synchronize the fork with the current upstream main revision 03f3b09.

This PR retains the upstream tree and adds the review-repair commit series on top: pinned build tooling, canonical todo_list handling, config-gated native file reads, Windows marker compliance, and removal of the bundled Perplexity vendor connector.

Local validation: scripts/run_tests.sh on the affected ACP, agent, file-operation, run-agent, and stale-PID suites: 25 files, 480 selected tests, 0 failures.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-08T06:57:22.165001Z 160a5ff New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

requires = ["setuptools==83.0.0", "wheel"]

P1 Badge Pin the newly added wheel build dependency

Pin or upper-bound wheel here. Every isolated PEP 517 build resolves this requirement independently, so the bare name permits an unreviewed future release to enter clean installs and potentially break or compromise the build before the project lock applies. This also violates the repository-wide requirement that every dependency carry an upper bound; update the lock after constraining it.

AGENTS.md reference: AGENTS.md:L292-L298


@pytest.mark.skipif(sys.platform != "win32", reason="real probe is windows-only")

P1 Badge Mark the native PID probe as windows_only

Replace this bare skipif with @pytest.mark.windows_only. I checked .github/workflows/tests-os.yml: the Windows job first selects only files containing the marker name and then runs -m windows_only; this file contains no such marker, while the Linux suite skips this test, so the real Windows PID-ownership probe silently runs in neither standard OS lane.

AGENTS.md reference: AGENTS.md:L360-L365


flag = os.environ.get("HERMES_NATIVE_FILE_READ", "1").strip().lower()

P1 Badge Route the native-read switch through config

Do not introduce HERMES_NATIVE_FILE_READ as the sole control for this behavioral flag. There is no corresponding config.yaml setting or normalization bridge, so disabling the new native fast path—for example after encountering a filesystem compatibility issue—requires an undocumented process-environment change that is neither profile-persisted nor available through the normal configuration UX. Add a config setting and bridge it internally, or make the test seam injectable instead of adding a public HERMES_* knob.

AGENTS.md reference: AGENTS.md:L79-L82

ℹ️ 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".

fangliquanflq and others added 28 commits September 7, 2026 06:04
Co-authored-by: crazyief <8566250+crazyief@users.noreply.github.com>
The memory_tool schema advertises new_text as an alias for content, and
memory_tool resolves it when content is None. But the table-driven inline
executor's arg_specs (agent/inline_tool_executors.py) did not list new_text,
so _call_tool's allowlist silently dropped it: a replace call using the
documented alias reached memory_tool with both fields None and failed with
"content is required for 'replace' action." — even though the caller
supplied the value. Forward new_text alongside content/old_text so the
documented alias fires and content still wins when both are set, matching
what the batch path (op.get("content") or op.get("new_text")) already
accepts.
… guidance

The corrupt-cause recovery guidance hardcoded `~/.hermes/backups/` while
every other path in the same message follows the active HERMES_HOME
(`{db_path}` is already interpolated). A custom-home or named-profile
deployment was told to restore from a directory that may not exist at all,
mid data-loss incident. Both sites (turn-completion explainer and gateway
startup broadcast) now interpolate `<hermes_root>/backups` via
get_default_hermes_root(), matching hermes_cli/backup.py's real backup
location.

Fixes NousResearch#104250
Apply the narrow registry fallback proposed in PR NousResearch#68458 without unrelated case normalization or dead legacy flags. Preserve dedicated named profiles before using CustomProfile. This corrects existing reasoning loss only; per-model dialect configuration remains a product decision.

Co-authored-by: saotu <160758706+saotu@users.noreply.github.com>
Salvage NousResearch#104301 error presentation and translations. Keep drill-in outcome local to its mounted scope, ignore stale responses, retain existing rows, and show retry even when cached lanes exist.

Co-authored-by: elvindu <dumanxiang@qq.com>
Adapt the callable-source diagnosis from snipecoder (NousResearch#102244) and fallback slice from BGwill-OUTLOOK (NousResearch#102721), without unrelated reasoning or override changes.

Co-authored-by: CloudWishOS <99405975+snipecoder@users.noreply.github.com>\nCo-authored-by: BGwill-OUTLOOK <bgwillwork@outlook.com>
Independent review found auto-created mock attributes could replace static credentials. Read the SDK instance's stored provider without triggering attribute synthesis.

Co-authored-by: CloudWishOS <99405975+snipecoder@users.noreply.github.com>

Co-authored-by: BGwill-OUTLOOK <bgwillwork@outlook.com>
Deletes the temporary --user-data-dir used by the update UI shim when the browser process is shut down, preventing ~100MB leaks per update. Fixes issue NousResearch#104350.
Track the path actually launched, preserving the no-UI case and unrelated profiles. Adapted the ownership approach from NousResearch#104362.

Co-authored-by: liuhao1024 <sunsky.lau@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0db7ea654

ℹ️ 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".

Comment thread .github/workflows/ci.yaml
# The fork's existing Code Scanning baseline cannot correlate the upgraded
# reusable-workflow identity on CI PR runs. The standalone weekly scan
# keeps the default upload-sarif=true for durable main-branch findings.
upload-sarif: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enable SARIF uploads on main pushes

The ci.yaml workflow runs for both pull requests and pushes to main, but this reusable-workflow call unconditionally passes upload-sarif: false. Consequently, the post-merge OSV scan also suppresses Code Scanning publication, even though the adjacent comment says the workaround is for PR runs; on main there is no PR review consumer, and the remaining short-lived artifact is not a durable alert. Pass false only when github.event_name == 'pull_request' so main-push scans retain SARIF.

Useful? React with 👍 / 👎.

Comment thread apps/desktop/electron/main.ts Outdated
function redialPoolBackendAfterResume(poolKey: string) {
const { connectionId, profile } = parseBackendScopeKey(poolKey)

return runClaimedBackendDial(connectionId, profile, () =>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the forced-local pool key during resume redial

When the global connection mode is remote, resolveRegistryLocalRoute deliberately stores the genuinely local backend under conn:local::<profile> so it cannot collide with the remote backend's bare profile key. This path parses that key into connectionId == "local" and then runClaimedBackendDial recomputes it through backendScopeKey, which collapses local back to the bare profile. If resume revalidation overlaps a renderer reconnect for that profile, the unrelated local and remote dials therefore join one claim and one caller can receive the other backend's descriptor; retain the original poolKey as the claim key for this path.

AGENTS.md reference: apps/desktop/AGENTS.md:L192-L196

Useful? React with 👍 / 👎.

@mrkillbob

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce7e81dc70

ℹ️ 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".

Comment thread .github/workflows/osv-scanner.yml Outdated
# The upstream reusable workflow uploads this exact file under its
# fixed artifact name, which the wrapper downloads below.
results-file-name: osv-results.sarif
upload-sarif: ${{ inputs.upload-sarif }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enable SARIF for direct workflow triggers

When this workflow runs from its own weekly schedule or workflow_dispatch trigger, it is not invoked through workflow_call, so the workflow_call.inputs.upload-sarif default is not populated; ${{ inputs.upload-sarif }} therefore resolves to an empty/false value and the child scanner still suppresses the SARIF upload. Fresh evidence after the earlier comment is that the repair only supplies true from the ci.yaml caller, leaving both direct triggers without a value; explicitly enable uploads for non-workflow_call events.

Useful? React with 👍 / 👎.

Comment thread acp_adapter/tools.py Outdated
"browser_get_images", "vision_analyze"),
"edit": ("write_file", "patch", "skill_manage"),
"search": ("search_files",),
"execute": ("terminal", "process", "execute_code", "browser_click", "browser_type", "browser_scroll",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Map the canonical process tool name in ACP

When a current ACP session invokes the renamed process_manage schema, this table and the related title/formatter tables recognize only the legacy process name. As a result, get_tool_kind() classifies the call as other, and, more importantly, _tool_result_failed() treats common tool_error() responses such as {"error":"session_id is required"} as completed because process_manage is absent from _POLISHED_TOOLS; Zed/VS Code therefore show failed process operations as successful. Add the canonical name alongside the replay alias, including the polished/title/completion mappings.

Useful? React with 👍 / 👎.

@mrkillbob

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

hermes-agent/AGENTS.md

Lines 71 to 72 in dfdd0ce

- **Contributor credit preserved.** Salvage external work by cherry-picking (rebase-merge) so
authorship survives; build on top rather than reimplementing.

P1 Badge Preserve the synchronized upstream commit history

Fresh evidence after the earlier sync comment is that the message now names 03f3b092, but that revision is still not an ancestor of this commit: the sole parent remains f93b350, collapsing 7,654 upstream commits from 546 authors into one Codex-authored snapshot. Merge or replay the upstream history and place the repair commits on top so contributor authorship remains in Git history.

AGENTS.md reference: AGENTS.md:L71-L72


monkeypatch.setattr(
config_module,
"load_config_readonly",
lambda: {"terminal": {"native_file_read": False}},
)

P1 Badge Exercise native-read configuration through the real loader

When this option is loaded from a real profile, this test cannot catch an incorrect HERMES_HOME, YAML merge, cache, or normalization path because it replaces load_config_readonly() with the desired dictionary. Write terminal.native_file_read: false into a temporary profile's config.yaml and invoke the real file-operation path instead; configuration propagation and file I/O are explicitly required to use real imports against a temporary HERMES_HOME.

AGENTS.md reference: AGENTS.md:L65-L67


def test_foreign_pid_reported_not_killed(self):
with self._patch_find(), mock.patch.object(
dashboard_procs.sys, "platform", "win32"
), mock.patch(

P1 Badge Run the dashboard kill-path tests on Windows

On non-Windows CI this makes only the imported module believe it is on Windows while the interpreter and host APIs remain POSIX, so the security-sensitive stale-process cleanup can appear covered without exercising its real Windows behavior. The same file also patches IS_WINDOWS for the legacy taskkill path; mark these cases windows_only and run them in the Windows lane rather than patching platform identity.

AGENTS.md reference: AGENTS.md:L349-L358


try:
window = float(getattr(agent, "fast_auto_seconds", DEFAULT_WINDOW_SECONDS))
except (TypeError, ValueError):
window = DEFAULT_WINDOW_SECONDS
agent._fast_until = time.monotonic() + max(window, 0.0)

P2 Badge Reject non-finite fast-mode windows

When agent.fast_auto_seconds is configured as YAML .nan/.inf or the equivalent string, float() accepts it and this deadline becomes NaN or infinity. The expiry comparison in effective_request_overrides() then never succeeds, so an auto or cold turn keeps the higher-priced fast tier for its entire tool loop instead of the configured bounded window; validate math.isfinite(window) and fall back or reject non-finite values.


assert DEFAULT_CONFIG["agent"]["service_tier"] == ""
assert DEFAULT_CONFIG["agent"]["fast_auto_seconds"] == 60

P1 Badge Assert fast-mode default propagation instead of literals

These assertions freeze two configuration defaults rather than checking a behavior contract, so an intentional change to the default mode or window will fail this test even if every loader and runtime consumer remains correct. Exercise the relationship instead—for example, verify that agent initialization receives the values from DEFAULT_CONFIG—rather than asserting "" and 60 directly.

AGENTS.md reference: AGENTS.md:L377-L386

ℹ️ 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".

@mrkillbob

Copy link
Copy Markdown
Owner Author

@codex review

@mrkillbob

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

hermes-agent/AGENTS.md

Lines 71 to 72 in 4da9713

- **Contributor credit preserved.** Salvage external work by cherry-picking (rebase-merge) so
authorship survives; build on top rather than reimplementing.

P1 Badge Preserve upstream ancestry instead of squashing the sync

Fresh evidence after the target-revision correction is that git show --format=%P still lists only f93b3507 as this commit's parent, while git rev-list f93b3507..03f3b092 contains 7,654 upstream commits. Consequently, the sync remains one Codex-authored snapshot rather than incorporating the declared upstream history, discarding contributor attribution and leaving the old fork point as the merge base for future upstream syncs; merge/rebase the upstream commits and apply the repair series on top.

AGENTS.md reference: AGENTS.md:L71-L72


monkeypatch.setattr(
config_module,
"load_config_readonly",
lambda: {"terminal": {"native_file_read": False}},
)

P1 Badge Exercise native-read opt-out through the real config loader

When a profile's config.yaml sets terminal.native_file_read: false, this test cannot catch a loader, merge, or profile-scoping regression because it replaces load_config_readonly() with a constant containing the desired value. The feature's only new config-path test therefore passes even if production never reads the setting from the active HERMES_HOME; write the YAML under a temporary HERMES_HOME and invoke ShellFileOperations with the real loader instead.

AGENTS.md reference: AGENTS.md:L65-L67

ℹ️ 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".

@mrkillbob

Copy link
Copy Markdown
Owner Author

Addressed the behavioral findings in e6c068c:\n\n- fast-mode now rejects non-finite configured windows and falls back to the bounded default; regression coverage covers NaN and both infinities.\n- the native-read config test now writes terminal.native_file_read to a temporary HERMES_HOME/config.yaml and uses the real loader.\n- default assertions now verify configuration/runtime relationship instead of freezing literal defaults.\n\nThe upstream-history finding does not match the exact checkout: 03f3b09 has parent 610c869, f93b350..03f3b09 contains 7,654 commits, and 03f3b09 is an ancestor of this PR head. The synchronized upstream history is therefore present; rewriting it would discard valid contributor ancestry.

@mrkillbob

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: e6c068c6b2

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

# The standard hosted pool is used here because the formerly requested
# large-runner label is not available on this repository.
runs-on: ubuntu-latest

P1 Badge Scale pytest workers down with the runner

When this workflow runs on the standard ubuntu-latest runner, it still sets HERMES_TEST_WORKERS: 96 at line 121 and launches that many concurrent pytest subprocesses, although the adjacent measurements were taken on a 96-core, 377 GB machine. On a standard runner this heavily oversubscribes CPU and memory, making the unsliced full-suite job likely to be OOM-killed or exceed its 30-minute timeout; remove the override so the test runner derives concurrency from the available CPUs, or restore slicing sized for the standard runner.

AGENTS.md reference: AGENTS.md:L313-L317


while True:
chunk = fh.read(1 << 20)
if not chunk:

P2 Badge Keep native file reads bounded and interruptible

With the new default native path enabled on local POSIX sessions, reading a large text file enters this loop and scans through EOF solely to count lines, without consulting the tool interrupt flag or any deadline. A multi-gigabyte or continuously appended log can therefore hold the tool thread beyond the configured terminal timeout and ignore /stop, whereas the shell-backed path runs through the environment's bounded execution layer; run this scan under the same deadline and interruption controls.


# The standard hosted pool is used here because the formerly requested
# large-runner label is not available on this repository.
runs-on: ubuntu-latest

P1 Badge Match test workers to the standard runner

When this workflow runs on the standard ubuntu-latest runner, it still sets HERMES_TEST_WORKERS: 96 at line 121 and launches that many concurrent pytest subprocesses, although the adjacent measurements were taken on a 96-core, 377 GB machine. On a standard runner this massively oversubscribes CPU and memory, making the unsliced full-suite job likely to be OOM-killed or exceed its 30-minute timeout; remove the override so the test runner derives concurrency from the available CPUs, or restore slicing sized for the standard runner.

AGENTS.md reference: AGENTS.md:L313-L317


while True:
chunk = fh.read(1 << 20)
if not chunk:

P2 Badge Keep native file reads bounded and interruptible

With the new default native path enabled on local POSIX sessions, reading a large text file enters this loop and scans through EOF solely to count lines, without consulting the tool interrupt flag or any deadline. A multi-gigabyte or continuously appended log can therefore hold the tool thread past the configured terminal timeout and ignore /stop, whereas the shell-backed path runs through the environment's bounded execution layer; run this scan under the same deadline and interruption controls.

ℹ️ 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".

@mrkillbob
mrkillbob merged commit d889b38 into main Sep 8, 2026
48 checks passed
@mrkillbob
mrkillbob deleted the codex/fork-main-sync-20260907 branch September 8, 2026 06:50
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

expect(body).toContain('runClaimedBackendDial(')

P1 Badge Exercise resume routing instead of scanning main.ts

Fresh evidence after the earlier wiring-test repair is that this remaining resume test still reads main.ts as text and only checks that nearby snippets exist. It can pass when runClaimedBackendDial is dead, commented out, or disconnected from the resume handler, while failing after behavior-preserving refactors; exercise the exported routing seam through the actual resume/redial path instead.

AGENTS.md reference: AGENTS.md:L388-L395


Providers can advertise multiple capabilities from a single class — Firecrawl, Tavily, Perplexity, Keenable, Exa, and Parallel all implement both search and extract. Brave Search and DDGS are search-only; SearXNG is search-only with a documented "pair me with an extract provider" workflow.

P2 Badge Remove the deleted Perplexity provider from capability docs

Fresh evidence after the Perplexity cleanup is that this changed line still states that Perplexity is an implemented search/extract provider, even though the same change deletes plugins/web/perplexity and repository-wide search finds no replacement web provider. Readers are therefore given a capability that this tree cannot supply; remove it from the bundled examples or explicitly link to a real standalone plugin.

AGENTS.md reference: AGENTS.md:L96-L101



P2 Badge Restore the shared environment timeout after this test

Because ops.env comes from the module-scoped _local_env fixture, assigning its timeout here permanently changes it from 60 seconds to 1 second for every subsequent parity case in this file. Under a loaded CI runner, later multi-megabyte native and shell reads can consequently return timeout errors and produce order-dependent flakes; use monkeypatch.setattr or otherwise restore the original timeout after this test.

AGENTS.md reference: AGENTS.md:L326-L329


await vi.waitFor(() => expect(rule.output()).toContain('6m 0s'), { timeout: 1_000 })

P2 Badge Give the asynchronous UI waits at least two seconds

After moving the JS checks onto shared standard runners, this synchronization still fails if the resumed render takes more than one second, recreating a load-dependent CI flake instead of bounding a genuinely hung test. The newly changed virtualHistoryOffsetCache wait uses the same one-second cap, so raise both to the repository's minimum two-second wall-clock bound.

AGENTS.md reference: AGENTS.md:L326-L329

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-reviewed Maintainer reviewed CI-sensitive changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.