Skip to content

Fail startup closed when a valve faults after ignition - #289

Merged
pejmantheory merged 2 commits into
mainfrom
cursor/critical-code-issues-a360
Oct 25, 2026
Merged

pejmantheory merged 2 commits into
mainfrom
cursor/critical-code-issues-a360

Conversation

@cursor

@cursor cursor Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Combustion verification and throttle-up did not read actuator status after the ignition pre-check. Fuel and oxidizer are already open in those states. A valve that reported Fault, Error, Disabled, Unknown, Moving, or AtPosition stayed at its last open command. A Ready operating chamber pressure then declared the engine running, and the running state does not command those valves again.

The same Ready gate used before each open now runs again after the spark pulse, during combustion verification, and before throttle-up can finish or keep ramping. A valve that is not Ready fail-closes on that pass. An abort that already won is left as abort. A Ready operating pressure with every actuator still Ready still declares the engine running and does not command the valves.

Related issues

None. Found in the daily safety scan.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only
  • Refactor / chore (no behavior change)

How to test

  1. dotnet test Tests/HelloblueGK.Tests.csproj -c Release --filter FullyQualifiedName~StartupSequenceControllerTests
  2. Confirm a faulted valve during the spark pulse, combustion verification, or throttle-up ends in Error with every valve commanded shut, and does not reach Running.
  3. Confirm Ready actuators and an operating chamber pressure still reach Running without a valve command.

Checklist

  • I read CONTRIBUTING.md and followed the development workflow
  • dotnet build succeeds locally (or I ran the equivalent CI steps)
  • dotnet test Tests/HelloblueGK.Tests.csproj passes (or tests are not applicable)
  • I added or updated tests for behavior changes
  • I updated documentation when behavior, APIs, or setup changed
  • My commit messages are clear and descriptive
  • I did not commit secrets, credentials, or .env files
  • First PR / docs-only work stays out of Certification/ unless the issue asked for it

Screenshots / logs (optional)

Release suite: 1604 passed, 0 failed. Startup sequence filter: 99 passed. dotnet list package --vulnerable --include-transitive reported no vulnerable packages for HelloblueGK, HelloblueGK.WebAPI, and HelloblueGK.Tests. That is a dependency audit of those three projects.

Open in Web View Automation 

Note

High Risk
Changes engine startup safety logic while propellant valves may be open; incorrect gating could spuriously abort or miss a faulted valve.

Overview
Extends actuator Ready gating so propellant valves cannot stay open while the sequence advances—or after it reaches Running—when fuel, oxidizer, or igniter is no longer Ready.

After the igniter spark pulse, the sequence re-runs RequireStartupActuatorsReadyAsync before entering combustion verification. The same check runs at the start and end of combustion verification (including after sensor reads), before and after throttle-up pressure logic, and at the end of the throttle ramp delay instead of only calling ContinueSequenceAsync. The control loop no longer treats Running as a no-op: each pass verifies actuators are still Ready and fail-closes if not.

Unit tests cover faults during spark, combustion wait, throttle-up, and while Running, plus the happy path where Ready actuators and operating pressure still reach Running without extra valve commands.

Reviewed by Cursor Bugbot for commit 9942b67. Bugbot is set up for automated code reviews on this repo. Configure here.

cursoragent and others added 2 commits October 24, 2026 16:11
Combustion verification and throttle-up ignored actuator status after the
spark pulse. A faulted valve stayed at its last open command, and a Ready
operating pressure could declare the engine running. Running does not
command those valves again. The same Ready gate used before each open now
applies again before combustion, before throttle-up can finish, and when a
valve faults during the spark pulse.

Co-authored-by: Pejman Haghighatnia <pejmantheory@users.noreply.github.com>
The running state used to return without reading actuator status, so a
valve that faulted after the sequence finished stayed at its last open
command until stop or abort. A pass that is still running now uses the
same Ready gate. Ready actuators are left where they are. Any other
status fail-closes and the closed loop retries the shutdown.

Co-authored-by: Pejman Haghighatnia <pejmantheory@users.noreply.github.com>
@pejmantheory
pejmantheory marked this pull request as ready for review October 24, 2026 18:30
@pejmantheory
pejmantheory requested a review from a team as a code owner October 24, 2026 18:30
@pejmantheory
pejmantheory merged commit 33331a8 into main Oct 25, 2026
14 checks passed
@pejmantheory
pejmantheory deleted the cursor/critical-code-issues-a360 branch October 25, 2026 08:32
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.

2 participants