Skip to content

refactor(engine): thread mutation context through remaining engine source (3/5) - #3431

Open
gsxdsm wants to merge 1 commit into
identity/2-engine-executorfrom
identity/3-engine-src
Open

refactor(engine): thread mutation context through remaining engine source (3/5)#3431
gsxdsm wants to merge 1 commit into
identity/2-engine-executorfrom
identity/3-engine-src

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Stack 3/5 — 54 files. Base: identity/2-engine-executor.

Completes the atomic engine-source conversion started in 2/5: heartbeat, agent tools, scheduling, healing, merge, missions, workflows, and the shared util/run-audit helpers. Engine typecheck goes green here.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 9657f59c-ae89-4ede-b5e8-54b660c73c76

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This stack continues the engine-wide mutation-attribution conversion by threading required run contexts through task, workflow, recovery, review, merge, mission, scheduling, and worktree mutations.

  • Adds actor-bearing mutation contexts to engine store writes and agent tools.
  • Tightens helper and structural seam signatures so callers must provide mutation context.
  • Converts engine run metadata to canonical store mutation contexts at persistence boundaries.
  • Retains explicit unattributed markers for unattended recovery and scheduler operations that lack a real principal.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/engine/src/agent-heartbeat.ts Builds an actor-bearing heartbeat run context and threads it through task tools, recovery writes, moves, and logs.
packages/engine/src/auth/fallback-model-observer.ts Tightens the observer seam so fallback task-log writes require an explicit mutation context.
packages/engine/src/execution/reviewer.ts Hoists one reviewer run context and reuses it across pause gates, tools, fallback reporting, retries, and task writes.
packages/engine/src/execution/session-token-usage.ts Derives attribution for token-usage persistence from the supplied run, agent, or role context.
packages/engine/src/execution/task-revert.ts Requires AI undo-task creation to carry the initiating mutation context through its structural store seam.
packages/engine/src/workflows/workflow-graph-executor.ts Threads workflow execution identity through graph-owned durable mutations.
packages/engine/src/scheduler.ts Adds explicit mutation attribution to scheduler-controlled state transitions and diagnostics.
packages/engine/src/merger.ts Propagates merge-lane mutation identity through task updates, logging, tools, and fallback-model observation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  S[Scheduler and recovery lanes] --> C[Run mutation context]
  A[Agent and reviewer sessions] --> C
  W[Workflow and merge execution] --> C
  C --> T[TaskStore mutation]
  T --> D[Durable task state]
  T --> U[Attributed audit evidence]
Loading

Reviews (22): Last reviewed commit: "refactor(engine): thread the mutation co..." | Re-trigger Greptile

@gsxdsm
gsxdsm force-pushed the identity/2-engine-executor branch from 4ddad9e to ee04d50 Compare August 14, 2026 03:46
@gsxdsm
gsxdsm force-pushed the identity/3-engine-src branch from e26a7ef to d407a8d Compare August 14, 2026 03:46
@gsxdsm
gsxdsm force-pushed the identity/2-engine-executor branch from ee04d50 to bfcf3b5 Compare August 14, 2026 03:54
@gsxdsm
gsxdsm force-pushed the identity/3-engine-src branch from d407a8d to 5ce4b60 Compare August 14, 2026 03:54
@gsxdsm
gsxdsm force-pushed the identity/2-engine-executor branch from bfcf3b5 to 4b02e41 Compare August 14, 2026 04:01
@gsxdsm
gsxdsm force-pushed the identity/3-engine-src branch from 5ce4b60 to 8c23e8c Compare August 14, 2026 04:01
@gsxdsm

gsxdsm commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

ThreatCrush Security Scan

4473 finding(s)

HIGH/CRITICAL: 43 | MEDIUM: 3941 | LOW: 489

Severity Rule Location
HIGH secret-database-url .github/workflows/full-suite.yml:55
HIGH secret-generic-credential .github/workflows/full-suite.yml:56
HIGH secret-database-url .github/workflows/full-suite.yml:241
HIGH secret-generic-credential .github/workflows/full-suite.yml:242
HIGH secret-database-url .github/workflows/full-suite.yml:281
HIGH secret-generic-credential .github/workflows/full-suite.yml:282
HIGH secret-database-url .github/workflows/pr-checks.yml:214
HIGH secret-generic-credential .github/workflows/pr-checks.yml:215
HIGH secret-generic-credential .github/workflows/release.yml:522
HIGH secret-generic-credential .github/workflows/release.yml:524
HIGH secret-generic-credential .github/workflows/test-release.yml:445
HIGH secret-generic-credential .github/workflows/test-release.yml:447
HIGH secret-generic-credential docs/cli-reference.md:80
HIGH secret-generic-credential docs/signals-connectors.md:34
HIGH secret-generic-credential docs/signals-connectors.md:77
HIGH secret-generic-credential docs/signals-connectors.md:94
HIGH secret-generic-credential docs/signals-connectors.md:117
HIGH secret-generic-credential docs/signals-connectors.md:159
HIGH secret-generic-credential packages/cli/STANDALONE.md:71
HIGH secret-database-url packages/core/src/postgres/credential-redact.ts:12
HIGH secret-database-url packages/core/src/postgres/credential-redact.ts:30
HIGH secret-database-url packages/core/src/postgres/credential-redact.ts:31
HIGH secret-database-url packages/core/src/postgres/credential-redact.ts:102
HIGH secret-database-url packages/core/src/postgres/credential-redact.ts:103
HIGH secret-generic-credential packages/core/src/postgres/embedded-lifecycle.ts:843
HIGH secret-database-url packages/core/src/postgres/embedded-lifecycle.ts:1574
HIGH secret-database-url packages/core/src/postgres/pg-backup.ts:756
HIGH js-ssrf-outbound-request packages/dashboard/app/public/sw.js:651
HIGH js-ssrf-outbound-request packages/dashboard/app/public/sw.js:727
HIGH js-host-header-trust packages/dashboard/src/cli-session-ws.ts:81
HIGH js-host-header-trust packages/dashboard/src/cli-session-ws.ts:115
HIGH js-ssrf-outbound-request packages/dashboard/src/routes.ts:1861
HIGH js-host-header-trust packages/dashboard/src/server.ts:2684
HIGH js-host-header-trust packages/dashboard/src/server.ts:2709
HIGH js-host-header-trust packages/dashboard/src/server.ts:3020
HIGH js-host-header-trust packages/dashboard/src/server.ts:3188
HIGH secret-slack-webhook plugins/examples/fusion-plugin-notification/README.md:46
HIGH secret-database-url scripts/pg-test-server.mjs:200
HIGH secret-database-url scripts/pg-test-server.mjs:231
HIGH secret-database-url scripts/pg-test-server.mjs:241
HIGH secret-generic-credential scripts/sync-fusion-skill-tools.mjs:550
HIGH secret-generic-credential scripts/verify-windows-elevated-restricted.mjs:81
HIGH secret-generic-credential scripts/verify-windows-encoding-recovery.mjs:41
MEDIUM redos-nested-quantifier docs/agents.md:1710
MEDIUM insecure-temp-file packages/cli/src/__tests__/bin.test.ts:141
MEDIUM insecure-temp-file packages/cli/src/__tests__/dev-with-memory-lib.test.ts:33
MEDIUM insecure-temp-file packages/cli/src/__tests__/dev-with-memory-lib.test.ts:34
MEDIUM insecure-temp-file packages/cli/src/__tests__/dev-with-memory-lib.test.ts:35
MEDIUM insecure-temp-file packages/cli/src/__tests__/dev-with-memory-lib.test.ts:43
MEDIUM insecure-temp-file packages/cli/src/__tests__/dev-with-memory-lib.test.ts:46

…and 4423 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@gsxdsm
gsxdsm force-pushed the identity/2-engine-executor branch from 9b25cb8 to a96ae2d Compare September 4, 2026 05:05
@gsxdsm
gsxdsm force-pushed the identity/3-engine-src branch from a805739 to efb30c4 Compare September 4, 2026 05:05
@gsxdsm
gsxdsm force-pushed the identity/2-engine-executor branch from 0b1be96 to b94b919 Compare September 4, 2026 05:20
@gsxdsm
gsxdsm force-pushed the identity/3-engine-src branch from 2375db8 to be34c66 Compare September 4, 2026 05:20
@gsxdsm
gsxdsm force-pushed the identity/2-engine-executor branch from b94b919 to 5b6895f Compare September 4, 2026 05:35
@gsxdsm
gsxdsm force-pushed the identity/3-engine-src branch 5 times, most recently from 7b2c8f9 to ec48f2f Compare September 4, 2026 08:24
…e source (3/5)

Fusion-Task-Id: FN-8821

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gsxdsm
gsxdsm force-pushed the identity/3-engine-src branch from ec48f2f to 51bb436 Compare September 4, 2026 08:42
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