Skip to content

B985: Phase 5 Distributed Pipeline - Clean Infrastructure Baseline (V3)#94

Merged
mkalhitti-cloud merged 64 commits into
mainfrom
phase-5-distributed-pipeline-v2
May 7, 2026
Merged

B985: Phase 5 Distributed Pipeline - Clean Infrastructure Baseline (V3)#94
mkalhitti-cloud merged 64 commits into
mainfrom
phase-5-distributed-pipeline-v2

Conversation

@mkalhitti-cloud
Copy link
Copy Markdown
Owner

@mkalhitti-cloud mkalhitti-cloud commented May 6, 2026

User description

Fresh PR for testing CI/CD configuration including Qwen 3.6 Max and GLM 5.1 actions, and to trigger a fresh DeepSource scan.

Summary by cubic

Sets a clean Phase 5 distributed pipeline baseline with safer order/follower callbacks and a single, hardened PR review flow. Removes broken OpenCode GLM/Qwen workflows and unused assets to keep CI reliable and the repo lean.

  • New Features

    • CI: Standardize on jules-pr-review with polling and branch resolution; remove glm-review.yml and qwen-review.yml; pin actions/checkout and release-drafter; switch links to JustinBeckwith/linkinator-action.
    • Repo hygiene: Add local systematic-debugging skills; purge large unused OOXML schemas/scripts.
  • Bug Fixes

    • Callbacks: Sync fleet expected positions, de-dup earlier, and split stop/target/trim handlers to prevent false flattens and ghost orders.
    • Propagation: Split master price moves into identify → resolve → apply, and always clear propagation flags.
    • Cancels/replacements: Prioritize stop replacements, purge pending cleanup, roll back unfilled entries, and remove ghost order refs.

Written for commit 1ab7c3a. Summary will update on new commits.


CodeAnt-AI Description

Stabilize order tracking and clean up failing review workflows

What Changed

  • Fleet account orders now update expected position tracking the same way as master orders, which prevents stale state from triggering false flattening actions after fills.
  • Follower order handling now separates cancel-replace, target-replace, stop replacement, and cleanup paths so valid replacement flows do not look like desyncs.
  • Price-move and execution handling now use clearer step-by-step paths for identifying affected orders, deduplicating executions, and keeping stop quantities aligned after fills and trims.
  • The Jules PR review workflow now waits longer between checks and runs for up to an hour, which reduces premature audit timeouts on long reviews.
  • Broken Qwen and GLM review setup files/workflows are removed from the repository.

Impact

✅ Fewer false flattening actions
✅ More reliable stop and target order updates
✅ Fewer premature PR review timeouts

🔄 Retrigger CodeAnt AI Review

Details

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

… complete

- master_roadmap.md: Phase 4 closed, Build-984 Source Hardening opened
- nexus_a2a.json: Phase set to B984_P3_ARCHITECT, 12 deferred findings catalogued
- docs/brain/build984_architect_intake.md: P1->P3 intake brief for Claude (F-01 to F-04 evidenced)

Phase 4 declaration: ProcessOnStateChange extraction verified live in src/V12_002.Lifecycle.cs
at handlers: SetDefaults(93) Configure(220) DataLoaded(302) Realtime(404) Terminated(451).
12 Arena findings triaged as pre-existing source defects, deferred to this mission.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

ProviderModelNotFoundError

opencode session  |  github run

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Jules Forensic Audit Result

Audit complete. Check session URL for details.

View Full Session

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Jules Forensic Audit Result

Audit complete. Check session URL for details.

View Full Session

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Jules Forensic Audit Result

Audit complete. Check session URL for details.

View Full Session

Comment thread .github/workflows/glm-review.yml Outdated
Comment thread .github/workflows/qwen-review.yml Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Jules Forensic Audit Result

Audit complete. Check session URL for details.

View Full Session

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 7, 2026

CodeAnt AI is running Incremental review

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 7, 2026

Code Review 👍 Approved with suggestions 1 resolved / 2 findings

Integrates multi-model PR review automation and hardens CI security with SHA-pinned actions and restricted permissions. While order propagation logic is improved, please refactor extracted methods to reduce excessive indentation for better readability.

💡 Quality: Extracted methods retain original deep indentation (unreadable)

📄 src/V12_002.Orders.Callbacks.AccountOrders.cs:491-505 📄 src/V12_002.Orders.Callbacks.AccountOrders.cs:357-371 📄 src/V12_002.Orders.Callbacks.Execution.cs:257-271

Several methods extracted during this refactoring retain the indentation level of their original inline position (e.g., 6-7 levels deep). This makes the code very hard to read and maintain. Examples: HandleMatchedFollower_StopReplacement (lines 491-528) has method body starting at 12+ spaces, with inconsistent brace alignment; HandleMatchedFollower_PendingCancelReplace (lines 357-429) has return true statements at mismatched indentation levels relative to their enclosing blocks. While syntactically valid, this greatly hinders readability of the newly-extracted methods.

✅ 1 resolved
Security: Workflow grants excessive permissions to unpinned third-party action

📄 .github/workflows/glm-review.yml:13-17 📄 .github/workflows/glm-review.yml:25
The glm-review.yml workflow grants contents: write and id-token: write to a third-party action referenced by a mutable tag (anomalyco/opencode/github@latest). A PR review bot only needs pull-requests: write to post comments. The contents: write permission allows the action to push commits or create/delete branches, and id-token: write enables OIDC token minting. Since @latest is a mutable tag, a supply-chain compromise of the anomalyco/opencode repository could silently inject code that abuses these elevated permissions.

The same pattern likely applies to the opencode.yml and qwen-review.yml workflows (excluded from diff but noted in stats).

🤖 Prompt for agents
Code Review: Integrates multi-model PR review automation and hardens CI security with SHA-pinned actions and restricted permissions. While order propagation logic is improved, please refactor extracted methods to reduce excessive indentation for better readability.

1. 💡 Quality: Extracted methods retain original deep indentation (unreadable)
   Files: src/V12_002.Orders.Callbacks.AccountOrders.cs:491-505, src/V12_002.Orders.Callbacks.AccountOrders.cs:357-371, src/V12_002.Orders.Callbacks.Execution.cs:257-271

   Several methods extracted during this refactoring retain the indentation level of their original inline position (e.g., 6-7 levels deep). This makes the code very hard to read and maintain. Examples: `HandleMatchedFollower_StopReplacement` (lines 491-528) has method body starting at 12+ spaces, with inconsistent brace alignment; `HandleMatchedFollower_PendingCancelReplace` (lines 357-429) has `return true` statements at mismatched indentation levels relative to their enclosing blocks. While syntactically valid, this greatly hinders readability of the newly-extracted methods.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@codeant-ai codeant-ai Bot added size:XXL This PR changes 1000+ lines, ignoring generated files and removed size:L This PR changes 100-499 lines, ignoring generated files labels May 7, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 7, 2026

CodeAnt AI Incremental review completed.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@codacy-production
Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 18 critical · 1 high · 17 medium · 64 minor

Alerts:
⚠ 100 issues (≤ 0 issues of at least minor severity)

Results:
100 new issues

Category Results
BestPractice 1 medium
2 minor
ErrorProne 18 critical
1 high
CodeStyle 62 minor
Complexity 16 medium

View in Codacy

🟢 Metrics 42 complexity · 7 duplication

Metric Results
Complexity 42
Duplication 7

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Jules Forensic Audit Result

Tests were executed successfully via dotnet build in the previous step. No files were modified in the codebase (working tree is clean) so code review is complete and frontend verification does not apply. I will now output the audit summary.

View Full Session

@mkalhitti-cloud mkalhitti-cloud merged commit de61d9d into main May 7, 2026
23 of 25 checks passed
mkalhitti-cloud added a commit that referenced this pull request May 20, 2026
…3) (#94)

* Build-983-Phase4-Dispatcher: ADR-020 Phase 4 Event Lifecycle Refactoring - Pure Structural Extraction

* fix(pr73): phantom blocks, shutdown guard, culture parse, unused fields

* docs: finalize mission tracking and P5 sign-off for Build 983

* docs: add implementation plan for PR #75 repairs

* Apply PR75 repairs D1 D2 D3 D6

* fix(adv1): upgrade exception logging to .ToString() for stack trace completeness

* fix: upgrade pre-existing MMIO exception logging to .ToString() to clear CI

* B984: Open Build-984 Source Hardening -- Phase 4 extraction confirmed complete

- master_roadmap.md: Phase 4 closed, Build-984 Source Hardening opened
- nexus_a2a.json: Phase set to B984_P3_ARCHITECT, 12 deferred findings catalogued
- docs/brain/build984_architect_intake.md: P1->P3 intake brief for Claude (F-01 to F-04 evidenced)

Phase 4 declaration: ProcessOnStateChange extraction verified live in src/V12_002.Lifecycle.cs
at handlers: SetDefaults(93) Configure(220) DataLoaded(302) Realtime(404) Terminated(451).
12 Arena findings triaged as pre-existing source defects, deferred to this mission.

* B984-P3: Architect plan -- 12 source hardening repairs + post-production refactor roadmap

* B984: Apply 12 source hardening repairs (F-01 to F-12)

* B984-P6: Close validation gate -- 12 repairs confirmed live (1111.005-v28.0-b984)

* B984: Apply final 4 repairs (F-13, F-14, F-15, F-16)

* fix(sima): update stale B948 tags to B984

* build(compliance): standardize StyleCop headers and update version to B984

* docs: update Master Roadmap to reflect Build-984 hardening completion

* ci: fix MSB1011 ambiguity by explicitly targeting Linting.csproj

* ci: allow environmental failures in hosted runners (missing NT8 assemblies)

* ci: harden sonarcloud and tests to handle missing dependencies

* security(ci): install 6-pillar workflow hardening suite [Build 984.1]

* docs: finalize B984 Workflow Hardening plan and nexus state

* chore(ci): harden workflows and fix Jules PR review triggers

* security(ci): install 6-pillar workflow hardening suite [Build 984.1]

* docs: finalize B984 Workflow Hardening plan and nexus state

* chore(ci): harden workflows and fix Jules PR review triggers

* fix(ci): switch markdown link checker and harden Jules context

* fix(ci): correct action name for linkinator and fix parameter name

* infra: harden Jules PR Review with branch resolution and polling

* infra: fix Jules AutomationMode enum value

* infra: complete hardening of Jules workflow and SHA pinning

* chore: save local settings changes

* B984: Finalize Build-984 Infrastructure & Documentation

* B985: Phase 5 Distributed Pipeline - Clean Infrastructure Baseline (V2)

* chore: remove graphify-out from tracking (zero-waste protocol)

* B985: Phase 5 - P1 Foundation + P3 Order Callbacks (Removed SIMA Core to stay under 150k limit)

* Fix Qwen action path and disable invalid GLM workflow

* Configure GLM 5.1 and Qwen 3.6 Max models

* docs(agents): harden protocol banning whitespace mutations and enforcing 150k char diff limit

* fix(ci): resolve merge conflicts in jules, markdown-link-check, release-drafter workflows

* refactor(propagation): extract PropagateMaster_BuildFallbackList and PropagateMaster_ExtractFollowerType to fix CS-R1140 cyclomatic complexity

* Revert "refactor(propagation): extract PropagateMaster_BuildFallbackList and PropagateMaster_ExtractFollowerType to fix CS-R1140 cyclomatic complexity"

This reverts commit 770d59a.

* ci(security): SHA-pin actions and tighten permissions in GLM, Qwen, OpenCode workflows

* ci(fix): revert invalid action SHAs -- use @latest for opencode, @main for qwen; add continue-on-error to opencode-review

* ci(fix): add submodules=false to checkout -- AntrigravityMobile submodule has no URL in .gitmodules

* ci(fix): switch opencode-review to GLM credentials; remove continue-on-error so reviews must actually run

* ci(cleanup): remove redundant opencode.yml -- GLM via opencode is already covered by glm-review.yml

* ci(fix): remove persist-credentials=false from review checkouts -- forces git submodule foreach which crashes on orphaned AntrigravityMobile submodule config

* Fix AI code review configurations (Zhipu and Qwen parameters)

* Fix Qwen and GLM configurations

* Fix Qwen settings JSON and add debugging

* Enable Qwen debug and switch GLM to native ZAI provider

* Fix Qwen auth and GLM provider

* Standardize on OpenCode with opencode.json config

* Fix opencode.json schema

* Fix opencode.json schema (take 2: models key)

* Standardize review pipelines on direct OpenAI env vars (bypassing opencode.json)

* fix: Rebuild Jules AI polling logic and purge broken OpenCode workflows

* infra: move systematic-debugging to local skills and purge broken CI actions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agent / Manifesto Orders / Callbacks size:XXL This PR changes 1000+ lines, ignoring generated files Workflows / CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant