Repository navigation
Logic bugs in luna_run, luna_note, runs_as_table, luna_new_project, luna_clone, update_cache - #65
Merged
roninsightrx merged 2 commits intoOct 20, 2026
Conversation
- luna_run: allow a NULL nmfe fallback so an unset tools.nonmem.nmfe no longer aborts when tools.modelfit.nmfe is set (or neither is set). - luna_note/luna_tag: always write the run back, so clear = TRUE without a note actually clears; abort when the run id is not in the project. - runs_as_table/luna_list: return an empty table for projects without runs. - luna_new_project: define models when import_models = FALSE, use seq_along(), and give template-based projects their metadata. - luna_clone: check the cache up front, abort when the source model (or the run folder for update_inits) is missing, and check file.copy(). - update_cache: use full folder paths for folder timestamps and avoid using the project path as a regex. - log_get_last_event: return NULL on an empty log; luna_help checks for NULL before using the event. - luna_ind: use ceiling() for the number of pages so partial pages work. - find_file_with_fallback: abort regardless of verbose; luna_tables now opts out explicitly to keep its own message. - get_flag_from_config: honour the default argument. - luna_gof: plot the selected residual (CWRES or NPDE). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
roninsightrx
commented
Oct 20, 2026
roninsightrx
left a comment
Collaborator
Author
There was a problem hiding this comment.
🤖 Codex review, round 1: ✅ approved
The implementation addresses all reported logic bugs with appropriate regression coverage. The full test suite passes: 466 tests, 0 failures or warnings.
roninsightrx
marked this pull request as ready for review
October 20, 2026 21:19
roninsightrx
commented
Oct 20, 2026
roninsightrx
left a comment
Collaborator
Author
There was a problem hiding this comment.
🤖 Codex review, round 1: ✅ approved
The implementation addresses all reported logic bugs with appropriate regression coverage. The full test suite passes. R CMD check also completed; its warnings/notes concern pre-existing package-wide issues rather than this change.
Resolve conflicts with #63/#64 and #66: - DESCRIPTION: bump to 0.2.4 (main is at 0.2.3). - luna_new_project: use main's new_project_from_template() for the YAML, keep this branch's shared metadata assignment. - luna_ind: take main's min()-based end index (partial pages already handled there); keep the page-out-of-range test from this branch. - luna_gof: keep plotting the selected residual, with main's descriptive axis label extended to NPDE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
roninsightrx
commented
Oct 20, 2026
roninsightrx
left a comment
Collaborator
Author
There was a problem hiding this comment.
🤖 Codex review, round 2: ✅ approved
All issue items are correctly addressed, with appropriate regression coverage. The full test suite passes: 492 tests, 0 failures, 0 warnings.
roninsightrx
deleted the
auto/62-logic-bugs-in-luna-run-luna-note-runs-as
branch
October 20, 2026 23:39
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.
Closes #62
Fixed all logic bugs listed in #62 (luna_run nmfe fallback, luna_note clear/unknown id, empty-project runs_as_table/luna_list, luna_new_project import/template, luna_clone source checks, update_cache folder paths, empty-log handling, luna_ind paging, find_file_with_fallback abort, get_flag_from_config default, luna_gof residual) and added regression tests; full test suite passes.
🤖 Implemented by Claude Code and reviewed by Codex, orchestrated by auto. Review rounds are posted as comments below.