feat(robot): allow conditional no-status-rc#634
Draft
axisrow wants to merge 2 commits into
Draft
Conversation
Allow no-status-rc to reuse the existing Condition model while preserving the current boolean and ON/OFF/DEFAULT flag semantics. Add behavioral coverage for root, profile, and rebot configuration, and regenerate the public model documentation and JSON schema. Fixes robotcodedev#482 AI-Assisted-By: OpenAI Codex via Agent Orchestrator Signed-off-by: axisrow <axisrow@users.noreply.github.com>
Exercise the exact issue configuration through a real RobotCode run so main suppresses the failing status and feature branches preserve it. Keep the shared Condition schema free of a misleading context-specific documentation link. AI-Assisted-By: OpenAI Codex via Agent Orchestrator Signed-off-by: axisrow <axisrow@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow
no-status-rcto accept the existingConditionform, enabling branch-dependent status-code behavior without duplicating profiles:A failing Robot run now returns
0onmainand preserves the failure status on feature branches. Existingtrue,false,on,off, anddefaultbehavior remains unchanged.Fixes #482.
Design choice
I prototyped both designs raised in the issue against the same 12 behavioral cases:
Condition { if = ... }.BoolExpression { expr = ... }type.Both produced the required boolean flag behavior. I kept
Conditionbecause it matches the requested syntax, reuses the existing safe evaluation path, and avoids another public model and schema definition. The conditional form resolves totrueorfalse; staticdefaultremains available through the existing literal form.Because
Conditionis now shared by profile fields and a flag field, the schema generator also avoids attaching a context-specific documentation link to its sharedifproperty.Type of change
Checklist
hatch run test:testpasses locally (RF matrix against the default Python) — or N/A for documentation-only / non-code changes. See Running Tests for faster iteration options and the full matrix.hatch run lint:allpasses (also enforced by the pre-commit hooks if installed) — or N/A for documentation-only / non-code changes.git commit -S, GPG/SSH).AI / tooling disclosure
Additional notes
Acceptance proof
The end-to-end test uses the configuration shown above, selects the single
ciprofile throughdefault-profiles, and runs a deliberately failing Robot suite through a real RobotCode subprocess without-p:CI=true,CI_COMMIT_REF_NAME=main:--nostatusrc, exit code0.CI=true,CI_COMMIT_REF_NAME=feature/example:--statusrc, exit code1.The same test fails on unmodified
mainwhile parsingprofiles.ci.no_status_rcbecause the conditional table is not accepted there.Verification
hatch run test:test: passed acrossrf50,rf60,rf61, andrf70throughrf74; the finalrf74run reported 3933 passed, 22 skipped, and 2 xfailed.git diff --check: passed.A fresh
hatch run lint:allreaches one mypy 2.2.0comparison-overlaperror in the untouchedpackages/plugin/src/robotcode/plugin/__init__.py:352. The same error reproduces on unmodifiedmain; Ruff and all feature-related tests pass. The lint checklist remains intentionally unchecked.Generated artifacts
The model and schema were regenerated with:
The updated
no-status-rcdocumentation matches the generated model output. Generator compatibility adjustments preserve existing field aliases, the existingmax-error-lines = "NONE"example, and generated-block spacing so regeneration does not introduce unrelated output drift.