Skip to content

fix(gbrain): parse refresh detection without Python path dependency#1981

Draft
maxpetrusenkoagent wants to merge 1 commit into
garrytan:mainfrom
maxpetrusenkoagent:hermes/oss-pr-2026-06-11-gstack-1967
Draft

fix(gbrain): parse refresh detection without Python path dependency#1981
maxpetrusenkoagent wants to merge 1 commit into
garrytan:mainfrom
maxpetrusenkoagent:hermes/oss-pr-2026-06-11-gstack-1967

Conversation

@maxpetrusenkoagent

Copy link
Copy Markdown

Summary

  • fixes gstack-config gbrain-refresh so the detection summary no longer depends on Python opening the detection file path
  • parses the flat gbrain-detection.json status/version fields with shell grep/sed first, then keeps Python only as a fallback
  • adds a regression test with a fake PATH python3 that fails like native Windows Python does on MSYS-style paths

Closes #1967

Verification

  • bun test test/gstack-config-gbrain-refresh.test.ts (failed before the fix, passes after)
  • bash -n bin/gstack-config
  • bun test test/gstack-config-gbrain-refresh.test.ts test/gstack-config-redact-keys.test.ts
  • Windows CI subset equivalent plus new regression:
    bun test test/gstack-paths.test.ts browse/test/claude-bin.test.ts test/test-free-shards.test.ts browse/test/file-permissions.test.ts browse/test/security.test.ts browse/test/server-sanitize-surrogates.test.ts test/setup-windows-fallback.test.ts test/build-script-shell-compat.test.ts test/docs-config-keys.test.ts test/brain-sync-windows-paths.test.ts make-pdf/test/browseClient.test.ts make-pdf/test/pdftotext.test.ts test/gstack-config-gbrain-refresh.test.ts
  • Local autoreview subagent: clean, no blocking findings

Notes

  • I also tried bun run test:windows; it failed in existing browse/test/terminal-agent.test.ts on a source-level guard unrelated to this diff. The actual Windows workflow's curated file list plus the new regression passes locally.

@maxpetrusenkoagent

Copy link
Copy Markdown
Author

Hermes verification note

Autoreview against the exact PR diff is clean.

Verification run locally:

  • bun test test/gstack-config-gbrain-refresh.test.ts failed before the fix and passes after
  • bash -n bin/gstack-config
  • bun test test/gstack-config-gbrain-refresh.test.ts test/gstack-config-redact-keys.test.ts
  • Windows workflow subset equivalent plus this regression:
    bun test test/gstack-paths.test.ts browse/test/claude-bin.test.ts test/test-free-shards.test.ts browse/test/file-permissions.test.ts browse/test/security.test.ts browse/test/server-sanitize-surrogates.test.ts test/setup-windows-fallback.test.ts test/build-script-shell-compat.test.ts test/docs-config-keys.test.ts test/brain-sync-windows-paths.test.ts make-pdf/test/browseClient.test.ts make-pdf/test/pdftotext.test.ts test/gstack-config-gbrain-refresh.test.ts

Reviewer state:

  • GitHub reports no checks on this fork branch, so I ran explicit Codex autoreview against gh pr diff #1981.
  • Codex verdict: clean, no blocking findings.

Known unrelated local gate note:

  • bun run test:windows currently fails in existing browse/test/terminal-agent.test.ts source-level guard. This PR does not touch browse/src/terminal-agent.ts or that test, and the actual Windows workflow's curated file list plus the new regression passes locally.

@trunk-io

trunk-io Bot commented Jun 11, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@maxpetrusenkoagent maxpetrusenkoagent force-pushed the hermes/oss-pr-2026-06-11-gstack-1967 branch from 7d69cf3 to 0778432 Compare June 11, 2026 21:05
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.

gstack-config gbrain-refresh on Windows always reports local-status: unknown — Windows Python cannot open the MSYS-style detection-file path

1 participant