Skip to content

Revert "Fix info parameter not appearing in autograding failure messages"#19

Open
smasongarrison wants to merge 1 commit intomainfrom
revert-18-copilot/add-info-to-unit-test-feedback
Open

Revert "Fix info parameter not appearing in autograding failure messages"#19
smasongarrison wants to merge 1 commit intomainfrom
revert-18-copilot/add-info-to-unit-test-feedback

Conversation

@smasongarrison
Copy link
Copy Markdown
Member

Reverts #18 ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.2.0 ✔ readr 2.2.0
✔ forcats 1.0.1 ✔ stringr 1.6.0
✔ ggplot2 4.0.2 ✔ tibble 3.3.1
✔ lubridate 1.9.5 ✔ tidyr 1.3.2
✔ purrr 1.2.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (http://conflicted.r-lib.org/) to force all conflicts to become errors

Attaching package: ‘MASS’

The following object is masked from ‘package:dplyr’:

select

Loading required package: viridisLite

Attaching package: ‘testthat’

The following objects are masked from ‘package:readr’:

edition_get, local_edition

Error: Error: '|' is an unrecognized escape in character string (:26:22)
Execution halted
Error: Tests failed to run (R error before metrics were written)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts a prior change to the TAP failure-message parsing logic in the reusable autograding workflow, aiming to restore previous behavior for how testthat failure details are extracted and shown in the GitHub Actions summary.

Changes:

  • Reverted logic that handled more complex message: parsing in TAP diagnostics.
  • Adjusted message-line trimming and simplified message key detection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +391 to +395
raw <- sub('^message:[[:space:]]*', '', msg_lines[msg_idx[1]])
j <- msg_idx[1] + 1L
while (j <= length(msg_lines) && grepl('^ ', msg_lines[j])) {
raw <- paste0(raw, ' ', trimws(msg_lines[j]))
j <- j + 1L
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg_lines is built with trimws(...) earlier, so continuation lines won’t retain the leading indentation. That makes the while ( ... grepl('^ ', msg_lines[j])) loop effectively dead and truncates multi-line failure messages to just the first message: line. Consider either keeping an untrimmed copy of msg_lines for indentation-based parsing, or adjusting the continuation detection to not rely on leading spaces that have been stripped.

Copilot uses AI. Check for mistakes.
@smasongarrison
Copy link
Copy Markdown
Member Author

@copilot I'm sorry but I wanted you to actually fix the error, not remove the functionality

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

@smasongarrison I've opened a new pull request, #20, to work on those changes. Once the pull request is ready, I'll request review from you.

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.

3 participants