Skip to content

dev#323

Merged
namastex888 merged 38 commits into
devfrom
main
Dec 17, 2025
Merged

dev#323
namastex888 merged 38 commits into
devfrom
main

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

No description provided.

- Move omni service to forge-core-services::services::omni
- Move forge_config to forge-core-services::services::forge_config
- Remove Android support (android.rs, jni deps)
- Delete forge-extensions/ directory
- Update all imports to use forge_core_services
- Fix prepare-commit-msg hook to use --no-verify for automated sync
- pre-push hook now auto-pushes forge-core first if unpushed commits
- pre-push hook auto-disables patches and amends commit
- No more manual dev-core-off needed - git push handles everything
- make dev-core re-enables patches when needed
- Change `super::super::omni::` to `crate::services::omni::` for cleaner imports
- Document forge-core-only changes edge case in DUAL_REPO_WORKFLOW.md
- Add warning about uncommitted changes before dev-core-off

Council review feedback applied (simplifier recommendation).
The pre-push hook now handles everything automatically:
- Pushes forge-core first (if unpushed commits)
- Disables Cargo [patch] overrides
- Regenerates Cargo.lock
- Amends commit with config changes

Updated:
- AGENTS.md Amendment #11: "Fully Automatic" instead of manual steps
- docs/DUAL_REPO_WORKFLOW.md: Removed dev-core-off from normal workflow

`make dev-core-off` is no longer part of normal workflow.
- Updated AGENTS.md Amendment #11: simplified to 3-step workflow
- Rewrote forge-core-workflow.md spell: ONLY command is `make dev-core`
- Updated docs/DUAL_REPO_WORKFLOW.md: removed all legacy edge case notes
- Fixed pre-push hook: error message no longer mentions dev-core-off
- Simplified forge-core blocker hooks: cleaner workflow instructions

The pre-push hook now handles everything automatically:
1. Push forge-core first (if unpushed commits)
2. Auto-disable Cargo [patch] overrides
3. Regenerate Cargo.lock with git deps
4. Amend commit with config changes
5. Allow push to proceed

No manual intervention required. Just: make dev-core → edit → commit → push
## Changes

### forge-core
- Enable RC version publishing to crates.io (tag pattern: v0.8.7-rc.30)
- Add rollback safety: yank published crates on failure
- Auto-chain publish-crates.yml from pre-release.yml
- Add workflow_call trigger for programmatic invocation
- Add prerelease flag to GitHub releases

### forge
- Fix sync race condition: query specific workflow run ID
- Use timestamp-based filtering to find triggered workflow
- Increase timeout and add better error handling

## Workflow
PR merge with "rc" label → forge release → forge-core sync →
crates.io publish (7 crates) → GitHub release

Zero manual intervention required.
GitHub's on.push.tags uses glob patterns, not regex.
- [0-9]+ only matches single digit + literal plus sign
- [0-9]* matches any digit sequence (correct glob)

Added documentation about this common pitfall.
…hing

- Remove multi-platform binary builds (not needed for crates.io)
- Remove npx-cli packaging
- Remove macOS code signing
- Reduce pre-release.yml from 463 to 125 lines
- Update test.yml to use [self-hosted, Linux, X64] runner labels
- Add workspace cleanup step for self-hosted runners
- Update toolchain to nightly-2025-12-04

New flow: workflow_dispatch → bump-version → publish-crates.yml
Build time: 10+ min → <3 min
Downloaded from crates.io - all 7 crates now published and verified.
The pnpm/action-setup creates ~/setup-pnpm which can become stale on
self-hosted runners, causing ENOTEMPTY errors on rmdir.
The examples were using the old `forge_core_services` path which no
longer exists. Updated to use `services` module path instead.
The Node.js self-installer fails with ENOENT when the runner state
is corrupted. Standalone mode downloads a prebuilt binary instead.
Major changes:
- Fix global profile cache race condition by removing set_cached() calls
  (4 locations: task_attempts.rs, execution_runs.rs, tasks.rs)
- Rename DEFAULT → GENIE in profile code and default_profiles.json
- Add variant field to ExecutionRun for profile alignment
- Simplify tasks.rs to kanban-only (exclude agent-related endpoints)
- Add profile_loader service with per-workspace caching via ProfileCacheManager

Thread-safe architecture:
- ProfileCacheManager now caches profiles per-workspace
- No more global state mutation with ExecutorConfigs::set_cached()
- Concurrent project access is now safe

Migration:
- 20251212100000_add_variant_to_execution_runs.sql adds variant column
- Fix ESLint warning: add useWorktree to useCallback deps in TaskFormDialog
- Remove unused types: MarkdownLinkProps, MarkdownDivProps from markdown.ts
- Configure Knip ignoreIssues for VirtualizedList.tsx false positives

Quality gates now pass:
- ESLint: 0 warnings
- Knip: 0 dead code warnings
- TypeScript: 0 errors
- Build: Success
In WSL2, closed ports timeout instead of returning "connection refused".
Without an explicit timeout, isPortAvailable() hangs indefinitely.
Added 1s timeout to net.createConnection and handle timeout event.
Build Task struct directly from row data instead of calling
Task::find_by_id() for each row in the loop. This reduces
query count from O(n+1) to O(1) for kanban board loading.
- Update sync-forge-core-tag.yml to handle crates.io version strings
- Add repository_dispatch notification to forge-core publish-crates.yml
- Fix sed patterns to update workspace dependencies (not git tags)
- Update forge-core workspace deps to 0.8.7-rc.38

The workflow now:
1. forge-core publishes to crates.io
2. Sends repository_dispatch to automagik-forge
3. sync-forge-core-tag.yml updates all 7 workspace dependencies
4. Creates PR automatically - zero manual version editing
Root cause: setup-node action references $PNPM_VERSION but it was
undefined in test.yml and playwright-e2e.yml. This caused pnpm to
fall back to auto-detection, which fails on stale cache.

Fix: Define PNPM_VERSION=9.15.4 (matches lockfileVersion 9.0)
pnpm/action-setup@v4 rejects having both `version` parameter AND
`packageManager` in package.json. Removed version parameter from
composite action to let it auto-detect from package.json.
Critical fixes:
- Extract test module from services/mod.rs (1098→641 lines) to comply with 1000-line limit
- Fix pre-push hook silent failures - proper error handling for cargo fetch and git amend
- Port OmniClient HTTP tests to forge-core-services (10 tests from deleted forge-extensions)
- Add circuit breaker to Omni notification worker (MAX_CONSECUTIVE_FAILURES=10)

Important fixes:
- Fix incorrect exclude_agents comments in router.rs
- Fix misleading health check message
- Remove dev-core-off from Makefile (fully automated via hooks now)
- Update stale zerocopy pin comment in Cargo.toml
- Add ::warning:: annotations for PAT_TOKEN missing in release workflow

Suggestions:
- Remove magic number comment (37 agent profiles)
- Fix HeaderValue unwrap panic risk with safe fallback
namastex888 and others added 8 commits December 16, 2025 01:20
@namastex888
namastex888 merged commit 506fa8e into dev Dec 17, 2025
1 check passed
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @namastex888, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on a significant refactoring of the project's architecture by moving forge-extensions functionalities directly into forge-core-services. This change aims to simplify the codebase, improve maintainability, and consolidate core logic. Concurrently, the developer workflow for dev-core mode has been fully automated through enhanced Git hooks, eliminating manual steps and reducing potential errors. The PR also includes the removal of Android-specific JNI bindings and various dependency updates across the Rust and JavaScript ecosystems.

Highlights

  • Refactoring Forge Extensions into Forge-Core: The forge-extensions/config and forge-extensions/omni crates have been removed. Their functionalities (ForgeConfigService, OmniService, GenieProfileLoader, ProfileCacheManager) have been migrated into forge-core-services, simplifying the project structure and consolidating core functionalities.
  • Automated dev-core Workflow: The make dev-core workflow has been significantly streamlined. The manual make dev-core-off command is no longer needed. Git hooks (pre-commit, prepare-commit-msg, pre-push) now automatically handle syncing forge-core changes, disabling Cargo patches, regenerating Cargo.lock, and amending commits during git push.
  • Removal of Android JNI Bindings: The forge-app/src/android.rs file and related Android-specific dependencies (jni, android_logger) have been removed, indicating a shift away from direct Android integration within forge-app.
  • Dependency Updates: Several Rust dependencies in Cargo.lock have been updated (e.g., moxcms, os_info, reqwest, zune-jpeg). Additionally, serde_yaml_ng was added, and several windows-sys and windows-targets versions were consolidated/updated.
  • Frontend Type Definition Simplification: Unused or redundant type definitions related to Markdown components (MarkdownLinkProps, MarkdownDivProps) have been removed from frontend/src/types/markdown.ts.
Ignored Files
  • Ignored by pattern: .github/workflows/** (5)
    • .github/workflows/build-all-platforms.yml
    • .github/workflows/playwright-e2e.yml
    • .github/workflows/release.yml
    • .github/workflows/sync-forge-core-tag.yml
    • .github/workflows/test.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This is a substantial and well-executed pull request that significantly refactors the development workflow, primarily by automating the dual-repository synchronization between automagik-forge and forge-core. The introduction of the intelligent pre-push hook is a massive improvement to the developer experience, removing many manual and error-prone steps. The architectural simplification of merging the forge-extensions crates into forge-core-services is a commendable move towards better modularity. The documentation updates across the board are thorough and clearly explain the new, streamlined process. I've identified one medium-severity issue in the Makefile related to a now-obsolete target that could cause confusion for developers adapting to the new workflow. Overall, this is an excellent set of changes that will greatly benefit the project's maintainability and developer productivity.

Comment thread Makefile
Comment on lines 961 to 967
push-both: ## Push both repos (automagik-forge + forge-core) together
@echo -e "$(FONT_CYAN)🚀 Pushing both repos...$(FONT_RESET)"
@# Safety: dev-core must be OFF
@if grep -q '^\[patch\."https://github.com/namastexlabs/forge-core' .cargo/config.toml 2>/dev/null; then \
echo -e "$(FONT_RED)❌ dev-core is ACTIVE - run 'make dev-core-off' first$(FONT_RESET)"; \
@# Safety: dev-core must be OFF (use git push to auto-disable via hook)
@if grep -q '^forge-core-.*= { path' .cargo/config.toml 2>/dev/null; then \
echo -e "$(FONT_RED)❌ dev-core is ACTIVE - use 'git push' (hook will auto-disable)$(FONT_RESET)"; \
exit 1; \
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The push-both target appears to be a remnant of the old workflow and is now confusing with the introduction of the fully automated pre-push hook. Its current implementation blocks execution and instructs the user to use git push instead, which could be perplexing.

To improve clarity and align the Makefile with the new streamlined workflow, I recommend removing the push-both target entirely. The git push command is now the single source of truth for pushing changes for both repositories.

This would involve:

  1. Removing push-both from the .PHONY list (line 1).
  2. Removing the push-both target implementation (lines 961-990).
  3. Removing the reference to make push-both from the dev-help target (line 937).

This change will make the Makefile cleaner and the development workflow less ambiguous for developers.

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