Skip to content

Merge master into main: GPU internal refactor + MCP debug mode + tooling updates#599

Open
donaldfilimon wants to merge 13 commits intomainfrom
master
Open

Merge master into main: GPU internal refactor + MCP debug mode + tooling updates#599
donaldfilimon wants to merge 13 commits intomainfrom
master

Conversation

@donaldfilimon
Copy link
Copy Markdown
Owner

@donaldfilimon donaldfilimon commented Mar 27, 2026

Summary

This PR merges all workspace changes from master into main, including:

GPU Module Refactor

  • Moved GPU implementation details from src/features/gpu/ to src/features/gpu/internal/
  • Updated all imports across the codebase to reflect new structure
  • Provides a cleaner public API surface while keeping internal implementation details separate

MCP Server Enhancements

  • Added --debug flag to abi-mcp for interactive REPL mode
  • New parseArgs() function for CLI argument handling
  • Added test coverage in src/mcp_main_test.zig

Platform Improvements

  • Enhanced SMC error logging in src/platform/smc.zig
  • Added test file src/test_smc.zig for SMC functionality

Tooling Updates

  • Modernized tools/crossbuild.sh with safe, minimal dry-run interface
  • Converted tools/hf_discord_models.sh to POSIX-compliant shell
  • Added Set-StrictMode to tools/crossbuild.ps1
  • Added new tools/verify_changes.sh for shell script validation
  • Added tools/merge_workspaces.sh for merging workspace histories
  • Added tools/ci/verify_ci.sh for CI verification
  • Added zig-abi-plugin/install-all.sh for plugin installation

Configuration & Documentation

  • Updated .mcp.json and build.zig/build.sh
  • Significant updates to AGENTS.md with entry points and workflow guidance
  • Updates to CLAUDE.md, removed GEMINI.md and HANDOFF.md
  • Added plans for abi-mcp hybrid integration

Changes

  • +18,066 lines added
  • -5,122 lines deleted
  • 291 files changed
  • 13 commits

Merge Status

⚠️ This PR currently has merge conflicts that need to be resolved before merging.

To Resolve Conflicts:

# Fetch latest changes
git fetch origin

# Checkout the PR branch
git checkout master
git pull origin master

# Merge main into the branch to resolve conflicts
git merge origin/main

# Resolve any conflicts in your editor, then:
git add .
git commit -m "Resolve merge conflicts for master → main"
git push origin master

Then the PR can be merged through the GitHub UI or via:

git checkout main
git merge master
git push origin main

claude added 6 commits March 25, 2026 09:15
…o response

The connector backend's generateConnector was producing "[{model_id}] Processing: ..."
but the test expected "[echo/{model_id}]" to be present in the output (model_id with
no slash resolves to echo mode). Update the format string to include the echo/ prefix
so the response correctly signals echo mode to callers.

https://claude.ai/code/session_01QwcMkaGPys1uvsM245DgG6
The echo fallback in generateConnector was producing `[test-model] Processing: ...`
but the test (added in 154c725) expects `[echo/test-model]` — i.e. the provider
should display as "echo" when no real connector is available.

Update the format string from "[{s}] Processing: {s}" to "[echo/{s}] Processing: {s}"
so the output matches the intended design and unblocks the failing test.

https://claude.ai/code/session_01EuZ1L2scyaDMj6WN5uNnWu
…hToConnector

Merge origin/master (832ff01) which applied the [echo/{s}] format fix to the
simpler generateConnector. Resolve conflict by keeping local version that
includes the full dispatchToConnector implementation, which also has the same fix.

https://claude.ai/code/session_01EuZ1L2scyaDMj6WN5uNnWu
Replace @alignCast/@ptrCast with @memcpy into a local variable to safely
read any type T from unaligned byte buffers. The previous approach panicked
at runtime when the source buffer had less alignment than T requires.

https://claude.ai/code/session_01Hm9CCXPsSVVzv2MkY8vJLA
Replaced @ptrCast/@aligncast with @memcpy into a properly-aligned local
variable, fixing a runtime panic when reading multi-byte types (u32, u16)
from byte-aligned slices like stack arrays.

https://claude.ai/code/session_01F5rsQdbiWwqKtPQW7whfnB
Remote branch independently applied the same mmap alignment fix and
contains additional validated work. Prefer remote on conflicts.

https://claude.ai/code/session_01F5rsQdbiWwqKtPQW7whfnB
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@donaldfilimon
Copy link
Copy Markdown
Owner Author

@claude

@donaldfilimon
Copy link
Copy Markdown
Owner Author

@claude merge into main and handle merge changes

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 4 potential issues.

View 10 additional findings in Devin Review.

Open in Devin Review

Comment thread src/api_server/server.zig
Comment thread src/features/ai/constitution/principles.zig
Comment thread src/ffi.zig
Comment thread src/core/database/storage/wal.zig
claude added 4 commits March 27, 2026 07:17
…ee, inference tests

- src/protocols/acp/mod.zig: removed duplicate isEnabled/isInitialized definitions (compile error on detached HEAD; already clean on master)
- src/foundation/security/jwt.zig: removed redundant defer block that double-freed the custom StringArrayHashMap after it was already explicitly deinited, causing an integer-overflow crash in the test runner
- src/inference/engine.zig + backends.zig: merged master's updated connector backend tests (UnsupportedProvider for bare model names, echo fallback for unknown providers, MissingApiKey path)

https://claude.ai/code/session_01TBoMAY5iRAk9tML96wH4dg
# Conflicts:
#	src/foundation/security/jwt.zig
#	src/inference/engine.zig
#	src/inference/engine/backends.zig
The defer block at line 268 and the inline cleanup block at line 283
both iterated and freed the same StringArrayHashMapUnmanaged entries,
then both called custom.deinit(). The defer running after the manual
cleanup caused an integer overflow panic in multi_array_list on the
already-freed backing storage.

Remove the redundant defer; the inline cleanup after createToken is
sufficient and is the intended ownership pattern.

https://claude.ai/code/session_01NfzuNbjkyBYBmPCBrXyAdP
Integrates upstream fixes for ACP duplicate fns, inference backend
tests, and JWT standalone tests. Local commit retains double-free fix
for the custom claims defer block.

https://claude.ai/code/session_01NfzuNbjkyBYBmPCBrXyAdP
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 15 additional findings in Devin Review.

Open in Devin Review

Comment thread src/api_server/handlers.zig
claude added 3 commits March 27, 2026 09:14
Replace @ptrCast(@aligncast(...)) with a @memcpy-based read to avoid
alignment panics when the backing buffer (e.g. stack-allocated [_]u8)
is not aligned for the requested type. Fixes crash in
core.database.formats.mmap.test.memory cursor basic.

https://claude.ai/code/session_01QzFn4zwZx4wgnNKLd4AyQP
After merging remote history (unrelated branches), three files had
broken state:

- backends.zig: generateConnector called removed dispatchToConnector;
  replace with direct echo-fallback allocPrint (connector dispatch
  was fully removed in remote refactor)

- jwt.zig: tests referenced decode/verify/isExpired/base64Url* as
  file-scope functions (added by remote) that weren't present after
  merge; add them as file-scope wrappers backed by jwt/standalone.zig
  helpers; fix isExpired to use wall-clock time (types.wallClockSeconds)
  instead of process-monotonic time.unixSeconds; add custom claim
  parsing to decode; restore custom-map cleanup in test to fix leak

- mmap.zig (pre-merge): replace @aligncast pointer cast with @memcpy
  to avoid alignment panic on unaligned byte buffers (fixes
  core.database.formats.mmap.test.memory cursor basic crash)

https://claude.ai/code/session_01QzFn4zwZx4wgnNKLd4AyQP
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 4 new potential issues.

View 20 additional findings in Devin Review.

Open in Devin Review

Comment thread build.sh
Comment thread src/features/ai/agents/gpu_agent.zig
Comment thread src/features/gpu/mega/mod.zig
Comment thread src/features/ai/llm/unified_orchestrator/utils.zig
@donaldfilimon donaldfilimon deleted the master branch April 14, 2026 12:29
@donaldfilimon donaldfilimon restored the master branch April 14, 2026 22:33
@donaldfilimon donaldfilimon reopened this Apr 14, 2026
@donaldfilimon donaldfilimon changed the title Master Merge master into main: GPU internal refactor + MCP debug mode + tooling updates Apr 15, 2026
@underswitchx
Copy link
Copy Markdown
Collaborator

@claude merge into main

@underswitchx
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

@underswitchx underswitchx added bug Something isn't working help wanted Extra attention is needed labels Apr 16, 2026
@underswitchx
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

@underswitchx
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request @claude

@underswitchx
Copy link
Copy Markdown
Collaborator

@cursoragent ...

@cursor
Copy link
Copy Markdown
Contributor

cursor bot commented Apr 16, 2026

You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor

@donaldfilimon
Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

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

Labels

aby bug Something isn't working codex help wanted Extra attention is needed

Projects

Development

Successfully merging this pull request may close these issues.

3 participants