Skip to content

Support instancePosition in standard output#598

Open
staging-devin-ai-integration[bot] wants to merge 1 commit intomainfrom
evalon/blaze-supp-84e7f6ce
Open

Support instancePosition in standard output#598
staging-devin-ai-integration[bot] wants to merge 1 commit intomainfrom
evalon/blaze-supp-84e7f6ce

Conversation

@staging-devin-ai-integration
Copy link

Add instancePosition support to standard output with pointer tracker

Summary

This PR extends sourcemeta::blaze::standard with a new overload that accepts a sourcemeta::core::PointerPositionTracker.

When the tracker is provided (Basic output mode), emitted error and annotation units are augmented with an instancePosition property containing line/column bounds as:

[ lineStart, columnStart, lineEnd, columnEnd ]

Implementation notes:

  • Existing standard(...) behavior/signature is preserved and now delegates internally.
  • instancePosition is only added when a tracker lookup exists for the unit's instanceLocation.
  • Added tests covering both:
    • error output with instancePosition
    • annotation output with instancePosition

Review & Testing Checklist for Human

  • Confirm the new overload signature/order (instance, tracker, format) matches the intended public API and downstream usage expectations.
  • Validate the instancePosition values (especially line/column indexing semantics) against expected PointerPositionTracker conventions for a few sample payloads, including nested objects/arrays if relevant.
  • Run/inspect a basic consumer flow that uses standard output and ensure the added field is only present when using the tracker overload, and existing output remains unchanged otherwise.

Recommended human test plan:

  1. Parse an instance with PointerPositionTracker and call the new standard(...) overload in Basic mode.
  2. Verify errors[*].instancePosition and annotations[*].instancePosition exist and map to the tracked pointer positions.
  3. Call the original overload and confirm output schema is unchanged (no instancePosition fields).

Notes

Co-Authored-By: bot_apk <apk@cognition.ai>
@staging-devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants