Skip to content

fix: split made_edit_or_build_check into separate flags and minor whitespace cleanup#288

Merged
Scott McMaster (scottmcmaster) merged 1 commit into
developfrom
06-03-scott-fix-made-edit-or-build-check
Jun 4, 2026
Merged

fix: split made_edit_or_build_check into separate flags and minor whitespace cleanup#288
Scott McMaster (scottmcmaster) merged 1 commit into
developfrom
06-03-scott-fix-made-edit-or-build-check

Conversation

@scottmcmaster

@scottmcmaster Scott McMaster (scottmcmaster) commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

"made edit" and "made build check" are tracked separately again (or now); this is to try and fix the build on develop

Test Plan

  • No test plan needed

Docs

  • Docs updated (companion PR in darkmatter/nixmac-web: #___)
  • No docs update needed

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Scott McMaster (scottmcmaster) commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • automerge - adds this PR to the back of the merge queue
  • urgent - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

LGTM!

(Reviewing through Graphite, giving this whole stack thing another try).

@czxtm cooper (czxtm) force-pushed the 06-03-scott-fix-made-edit-or-build-check branch from 834dc3b to 0c09458 Compare June 4, 2026 11:29
Copilot AI review requested due to automatic review settings June 4, 2026 11:29
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
Fails
🚫

bun failed.

Log

Details

Generated by 🚫 dangerJS against 0c09458

Copilot AI 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.

Pull request overview

This PR updates the Rust evolution loop (apps/native/src-tauri/src/evolve/mod.rs) to track “made an edit” vs “ran a build check” as separate flags, and adjusts how evolution limits are loaded to help address a build issue on develop.

Changes:

  • Split the previous combined “edit or build check happened” tracking into two booleans: made_edit and made_build_check.
  • Refactor evolution limit loading (notably moving max_output_tokens to be read via store::get_max_output_tokens, and loading max_build_attempts via config::EvolutionLimits::load).
  • Minor whitespace/comment cleanup.

Comment on lines 29 to 31
// Re-export public API
use crate::shared_types::EvolutionState;
use crate::shared_types::{Evolution, EvolutionState, FileEdit};
use crate::system::nix;
@scottmcmaster Scott McMaster (scottmcmaster) added this pull request to the merge queue Jun 4, 2026
Merged via the queue into develop with commit d445d24 Jun 4, 2026
14 of 15 checks passed
@scottmcmaster Scott McMaster (scottmcmaster) deleted the 06-03-scott-fix-made-edit-or-build-check branch June 4, 2026 11:52
cooper (czxtm) added a commit that referenced this pull request Jun 6, 2026
* Improve nixos/home-manager/nix-darwin doc tool

Improves doc tool by splitting up large JSON into a
hierarchical directory structure, and adds an index at the
root containing a table of contents and short info about each
key. This reduces context usage in the same way that the index
in skills does. The tools is also split up into two separate
tools, one for searching keys, and one for getting more info
about that key.

* chore: fix merge pr 255 (#292)

* feat(console): add resizable log panel

* feat(state): wire runtime slices and summarizer

* chore(fmt): add treefmt wiring

* chore(credentials): remove legacy plaintext fallback

* ci: add evaluate workflow

* fix(theme): scope Minted to Monaco diffs

* feat(settings): split backup and tuning panels

* refactor(frontend): move backend mirrors to viewmodel

* chore(beads): update state migration issues

* fix: repair branch-wide breakage so the merge compiles & tests pass

Prior to this commit, both this branch (since a92e61b) and the merge
result failed `cargo check` with 22 errors. The user asked for cargo +
bun validation against the merge resolution, so this commit fixes the
preexisting structural breakage that the merge inherited, plus a few
follow-ups uncovered by the test suites.

Rust:
- git/mod.rs: restore the develop-side mod.rs that declares
  `pub mod query` / `pub mod init` and re-exports the right names from
  each. The orphan query.rs / init.rs files were already on disk; only
  the mod entry was missing after a92e61b accidentally gutted it.
- evolve/mod.rs: route `repo_root` through `git::query` (its new home),
  pull `FileEdit` from `shared_types`, re-export `Evolution` from
  `shared_types::Evolution` (types.rs only imports it, doesn't re-export
  it), and fix the `made_edit_or_build_check` typo that develop's PR
  #272 introduced (variable never defined; should be
  `made_edit || made_build_check`).
- shared_types/git.rs: re-add `WatcherEvent` alongside the unused
  `GitState` slice type — `state/watcher.rs` still constructs it and
  needs the symbol back. Marked `GitState` `#[allow(dead_code)]` until
  the watcher migration finishes.
- summarize/queue_summarizer.rs: `#[allow(dead_code)]` on the
  not-yet-wired worker scaffolding (a92e61b carryover).
- commands/settings_io.rs: update an EvolutionLimits test fixture to
  include the new `max_token_budget` / `max_output_tokens` fields.

Frontend (post-merge tweaks):
- ipc/api.ts: drop the duplicate `devConfigs` entry the auto-merge
  produced (it appeared once near `settings` and again after
  `promptHistory`).
- ipc/types.ts: regenerated via `cargo run --example specta_gen_ts` to
  drop duplicated `ConfigField` / `ConfigurableSchema` / `EnumVariant`
  / `FieldType` blocks the auto-merge dual-inserted.
- viewmodel/git.ts + viewmodel.test.ts: switch the
  `git_state_changed` payload type from `GitState` (unused TS-side) to
  `WatcherEvent` (what the Rust watcher actually emits).
- hooks/use-evolve.ts: drop the eager `mirrorChangeMapState(null)` at
  the top of `handleEvolve`. Line 109 already correctly avoids
  overwriting the change map for conversational responses; the eager
  clear contradicted that and broke develop's PR #243 test that
  exercises conversational follow-ups.
- Tests (`use-evolve.test.ts`, `use-rollback.test.ts`,
  `prompt-input.test.tsx`, `system-defaults-cta.test.tsx`): swap the
  removed `setGitStatus` / `setEvolveState` / `setChangeMap` /
  `setSummaryAvailable` widget-store setters for the viewmodel mirror
  fns (`mirrorGitState`, `mirrorEvolveState`, `mirrorChangeMapState`).
  `summaryAvailable` no longer exists on the widget store; the
  related assertions are dropped.
- Storybook snapshots: 30 stories were regenerated after the
  AI Models tab field split, the system-defaults icon swap, and the
  hunk-pill render going through `DiffLineStatsBadge`.

Validation:
- `cargo check`: clean
- `cargo test`: 366 passed
- `bun run test:unit`: 116 passed
- `bun run test:storybook`: 165 passed
- `bun run build` (tsc + vite): clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix signing

* refactor: restore slice-event-per-slice contract in watcher

The earlier repair commit (8a19689) brought back `WatcherEvent` to make
state/watcher.rs compile, but that struct bundles four slices' worth of
state (git_status, change_map, evolve_state, error) onto the
`git_state_changed` channel. The intended architecture is one event per
slice, each carrying just that slice's state.

Watcher now emits:
- `git_state_changed`  →  GitState { git_status, external_build_detected }
- `change_map_changed` →  SemanticChangeMap   (unchanged)
- `evolve_state_changed` is no longer emitted from the watcher at all;
  evolve_state::set() writes through Slice<EvolveState>, whose
  write-guard already emits the event on drop. The watcher was emitting
  it twice.

Drop WatcherEvent from shared_types/git.rs and from the specta
registration; the `#[allow(dead_code)]` on GitState becomes unnecessary.

Separately, queue_summarizer's three #[allow(dead_code)] annotations
were honest: the commit a92e61b ("feat: wire runtime slices and
summarizer") never actually wired the worker — `app.manage(start_worker(handle)?)`
was missing from main.rs. Adding it now so the pipelines'
`try_state::<SummarizerState>()` path is actually used instead of always
falling back to inline processing.

Frontend follow-ups:
- viewmodel/git.ts subscribes `git_state_changed` as `GitState` now.
- viewmodel.test.ts constructs `GitState` (2 fields), not the made-up
  5-field WatcherEvent.
- types.ts regenerated via `cargo run --example specta_gen_ts`.

Validation: cargo check clean, 366 cargo tests pass, 116 unit tests
pass, tsc + vite build clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: some permission tests would fail on CI

Replace with more effective and reproducible tests.

---------

Co-authored-by: Cooper Maruyama <me@cooperm.com>
Co-authored-by: cooper <1325802+czxtm@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* scott-fix-made-edit-or-build-check (#288)

* ci(danger): use Node.js for coverage and danger steps

Bun 1.3.2 cannot run @vitest/coverage-v8 (node:inspector not
implemented) and fails to resolve Danger's internal runner module
('Script not found "runner"'). Switch both the coverage generation
and the danger ci steps to npx (Node.js 22) while keeping bun for
dependency installation.

Also adds statuses:write permission so Danger can set commit statuses.

* Improve nixos/home-manager/nix-darwin doc tool

Improves doc tool by splitting up large JSON into a
hierarchical directory structure, and adds an index at the
root containing a table of contents and short info about each
key. This reduces context usage in the same way that the index
in skills does. The tools is also split up into two separate
tools, one for searching keys, and one for getting more info
about that key.

---------

Co-authored-by: Juanpe Bolívar <raskolnikov@gnu.org>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Scott McMaster <scott@smcmaster.com>
Co-authored-by: darkmatter[bot] <283346107+darkmatter[bot]@users.noreply.github.com>
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.

3 participants