Skip to content

Comments

feat: add ignore_warnings parameter to EditSource#36

Open
kts982 wants to merge 1 commit intooisee:mainfrom
kts982:fix/editsource-warnings
Open

feat: add ignore_warnings parameter to EditSource#36
kts982 wants to merge 1 commit intooisee:mainfrom
kts982:fix/editsource-warnings

Conversation

@kts982
Copy link
Contributor

@kts982 kts982 commented Feb 23, 2026

Summary

  • EditSource previously treated all syntax check results (errors, warnings, info) as fatal, blocking saves
  • Now separates errors (E) from warnings (W) / info (I)
  • Adds ignore_warnings parameter (default: false — no breaking change)
  • Warnings are always returned in a new syntaxWarnings response field

Behavior

ignore_warnings Errors Warnings Result
false (default) Block Block (with hint to use ignore_warnings=true) Current behavior preserved
true Block Allow (returned in response) Save proceeds

Changes

  • pkg/adt/workflows.go — filter syntax results by severity, add IgnoreWarnings option, add SyntaxWarnings result field
  • internal/mcp/handlers_fileio.go — parse ignore_warnings parameter
  • internal/mcp/server.go — register ignore_warnings parameter on EditSource tool

Test plan

  • go build ./pkg/adt/ — compiles cleanly
  • Pre-existing unit tests pass (4 TestListRecordings failures are pre-existing on main)
  • Live system test passed against a SAP system:
    • Test program with pre-existing warning: "Redundant conversion for type STRING"
    • ignore_warnings=false (default): correctly blocked save with hint message
    • ignore_warnings=true: saved, activated, warning returned in syntaxWarnings field
    • Cleanup edit also succeeded

Refs #33

EditSource previously treated all syntax check results (errors,
warnings, info) as fatal, blocking saves. This forced users to
use syntax_check=false to work around pre-existing warnings like
"Redundant conversion for type STRING", which feels unsafe.

Now EditSource separates errors from warnings:
- Errors (E) always block the save
- Warnings (W) and info (I) block by default but can be allowed
  with ignore_warnings=true
- Warnings are always returned in the response (syntaxWarnings field)

Typical flow:
  Call 1: EditSource(...) → "2 warnings. Use ignore_warnings=true"
  Call 2: EditSource(..., ignore_warnings=true) → saves + activates

Refs oisee#33
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