GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(robot): allow conditional no-status-rc by axisrow · Pull Request #634 · robotcodedev/robotcode

Conversation

@axisrow

@axisrow axisrow commented Jul 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Summary

Allow no-status-rc to accept the existing Condition form, enabling branch-dependent status-code behavior without duplicating profiles:

default-profiles = ["ci"]

[profiles.ci]
enabled = { if = "environ.get('CI') == 'true'" }
no-status-rc = { if = "environ.get('CI_COMMIT_REF_NAME') == 'main'" }

A failing Robot run now returns 0 on main and preserves the failure status on feature branches. Existing true, false, on, off, and default behavior remains unchanged.

Fixes #482.

Design choice

I prototyped both designs raised in the issue against the same 12 behavioral cases:

  • Reuse Condition { if = ... }.
  • Add a public BoolExpression { expr = ... } type.

Both produced the required boolean flag behavior. I kept Condition because it matches the requested syntax, reuses the existing safe evaluation path, and avoids another public model and schema definition. The conditional form resolves to true or false; static default remains available through the existing literal form.

Because Condition is now shared by profile fields and a flag field, the schema generator also avoids attaching a context-specific documentation link to its shared if property.

Type of change

  • Bug fix
  • New feature
  • Refactor / internal change
  • Documentation
  • Build / CI / tooling
  • Breaking change

Checklist

  • I have read the Contribution Guide and the AI and Automated Contribution Policy.
  • The change is focused on a single concern (no unrelated refactors or formatting noise).
  • Tests for the change have been added or updated, and hatch run test:test passes 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:all passes (also enforced by the pre-commit hooks if installed) — or N/A for documentation-only / non-code changes.
  • Documentation has been updated where relevant (user docs, code comments, README).
  • Generated files (if any) were regenerated with the documented script, not edited by hand.
  • Commits follow Conventional Commits and are cryptographically signed (git commit -S, GPG/SSH).

AI / tooling disclosure

  • No AI/automation was used beyond ordinary editor autocomplete.
  • AI/automation was used; tool(s): OpenAI Codex through Agent Orchestrator
    • I reviewed the generated output manually, understand it, and verified it locally.

AI/tooling disclosure: This contribution was prepared with assistance from OpenAI Codex through Agent Orchestrator. I manually reviewed the diff, understand the implementation, verified it locally, and confirm that I have the right to submit it under the project license.

Additional notes

Acceptance proof

The end-to-end test uses the configuration shown above, selects the single ci profile through default-profiles, and runs a deliberately failing Robot suite through a real RobotCode subprocess without -p:

  • CI=true, CI_COMMIT_REF_NAME=main: --nostatusrc, exit code 0.
  • CI=true, CI_COMMIT_REF_NAME=feature/example: --statusrc, exit code 1.

The same test fails on unmodified main while parsing profiles.ci.no_status_rc because the conditional table is not accepted there.

Verification

  • hatch run test:test: passed across rf50, rf60, rf61, and rf70 through rf74; the final rf74 run reported 3933 passed, 22 skipped, and 2 xfailed.
  • Focused matrix: 28 tests passed in each of the eight Robot Framework environments.
  • Ruff check and formatting stages: passed; 413 files already formatted.
  • JSON Schema Draft 7 validation: passed.
  • Generator idempotence: repeated model and schema generation produced identical hashes.
  • git diff --check: passed.

A fresh hatch run lint:all reaches one mypy 2.2.0 comparison-overlap error in the untouched packages/plugin/src/robotcode/plugin/__init__.py:352. The same error reproduces on unmodified main; Ruff and all feature-related tests pass. The lint checklist remains intentionally unchecked.

Generated artifacts

The model and schema were regenerated with:

hatch run test.rf74:python scripts/generate_rf_options.py
hatch run test.rf74:ruff format packages/robot/src/robotcode/robot/config/model.py
hatch run test.rf74:python scripts/create_robot_toml_json_schema.py

The updated no-status-rc documentation matches the generated model output. Generator compatibility adjustments preserve existing field aliases, the existing max-error-lines = "NONE" example, and generated-block spacing so regeneration does not introduce unrelated output drift.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@axisrow
feat(robot): allow conditional no-status-rc
5a71b45
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 <[email protected]>
@axisrow axisrow mentioned this pull request Jul 12, 2026
[ENHANCEMENT, robot.toml] Make no-status-rc accept conditions (like enabled does) #482
Open
@axisrow
fix(runner): verify conditional status rc in CI
8c78f28
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 <[email protected]>
@axisrow
axisrow marked this pull request as ready for review July 18, 2026 11:15
@axisrow

axisrow commented Aug 13, 2026

Copy link
Copy Markdown
Author

@d-biehl — in #482 you flagged the Condition vs BoolExpression decision as the open question; this PR implements the Condition route (matching the requested syntax, reusing the existing evaluation path, no second public model), so if you'd prefer BoolExpression I'll rework it, and if you'd rather not take it at all I'd just appreciate the reasoning.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT, robot.toml] Make no-status-rc accept conditions (like enabled does)

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@axisrow
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.