Skip to content

fix: derive runtime banner from package version - #363

Draft
seonghobae wants to merge 3 commits into
masterfrom
codex/package-version-banner-20260912
Draft

fix: derive runtime banner from package version#363
seonghobae wants to merge 3 commits into
masterfrom
codex/package-version-banner-20260912

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Finding

DESCRIPTION is the R package version authority and declares 0.1.0, while protected autoFIPC() hard-codes runtime banner aFIPC 0.2. There is no accepted ADR/API contract establishing 0.2 as a separate method-version namespace, so this is a real version-authority mismatch rather than a documentation distinction to invent.

TDD lineage

Test-only RED head: 7eef331d38cbd40d68b8a5847b2a27c692713e50.

The focused regression captures the first autoFIPC() message before the existing input-validation error and requires the banner version to equal utils::packageVersion("aFIPC"). On the protected base that expectation is 0.1.0, while implementation emits 0.2.

The successor was pushed before a terminal hosted result for that RED generation, so no hosted RED is claimed.

Minimal causal repair

Current exact head: 3e21ef336e140b36b0a51c956995dbe982050aa6 on protected base master@f87c2324f1686135e57d8730c1b0b9420874f300.

Effective compare is limited to two paths:

  • R/aFIPC.R: replace the hard-coded 0.2 literal with as.character(utils::packageVersion("aFIPC")) while preserving the existing banner/credit surface;
  • tests/testthat/test-package-version-banner.R: focused metadata-authority regression.

An intermediate reconstruction introduced incidental whitespace/roxygen drift. History was not rewritten: ordinary-forward corrective head 3e21ef... restored the protected surrounding bytes, and the final PR diff contains only the intended version-authority change plus regression.

Exact-head gates

On 3e21ef...:

  • Code Quality 34623804857: SUCCESS;
  • Security Audit 34623804719: SUCCESS;
  • Security Scan 34623804748: SUCCESS;
  • SAST Semgrep 34623804819: SUCCESS;
  • R CMD check 34623804743: still running at the latest read;
  • Required CodeQL 34623804785: FAILURE caused by the central producer/consumer settlement ordering defect, not by this two-file leaf change. The compatibility consumer terminalized at 16:49:34Z; authoritative dispatch did not start until 16:49:38Z and then succeeded. Exact evidence was delivered to canonical owner .github#2051.

Current-head CodeRabbit review has been requested but is not treated as an approval.

Merge acceptance

Keep Draft until one unchanged exact head has terminal R/package and applicable quality/security gates, the central required-CodeQL owner-path accepts this identity correctly, zero valid unresolved current-head findings, and qualifying independent review. No self-approval, no-op retrigger, fixed-sleep workaround, gate weakening, force push, or fabricated second version authority.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c1f21b16-6b24-486a-ad71-25fa187f11e9

📥 Commits

Reviewing files that changed from the base of the PR and between f87c232 and 3e21ef3.

📒 Files selected for processing (2)
  • R/aFIPC.R
  • tests/testthat/test-package-version-banner.R

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

Current-head review requested for 3e21ef336e140b36b0a51c956995dbe982050aa6. Please verify that DESCRIPTION remains the single package-version authority, the runtime banner no longer hard-codes a divergent version, and the focused regression proves that contract without changing calibration behavior.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== HEAD =='
git rev-parse HEAD
git status --short
git show --no-ext-diff --format=fuller --stat HEAD

echo '== Changed files versus first parent =='
git diff --no-ext-diff --name-status HEAD^ HEAD
git diff --no-ext-diff --unified=80 HEAD^ HEAD -- DESCRIPTION

echo '== Candidate repository files =='
fd -t f -a -E .git | sed -n '1,240p'

echo '== R source outline =='
fd -e R -t f -a -E .git -x ast-grep outline {} --items all --type function --view compact 2>/dev/null || true

echo '== Version and autoFIPC references =='
rg -n -i -C 4 \
  -e 'packageVersion\s*\(' \
  -e '\bautoFIPC\s*<-|\bautoFIPC\s*=' \
  -e 'aFIPC[[:space:]]+[0-9]+\.[0-9]+' \
  -e 'Version:' \
  -e '0\.2' \
  -g '*.R' -g 'DESCRIPTION' -g '*test*' -g '*.md' .

echo '== Full current-head patch =='
git diff --no-ext-diff --unified=100 HEAD^ HEAD

Length of output: 226160


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Pull request metadata and current checks =='
gh pr view 363 --repo ContextualWisdomLab/aFIPC \
  --json number,state,isDraft,baseRefName,headRefName,headRefOid,commits,statusCheckRollup,url
gh api "repos/ContextualWisdomLab/aFIPC/commits/3e21ef336e140b36b0a51c956995dbe982050aa6/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name, .status, .conclusion, .details_url] | `@tsv`' || true

echo '== PR merge base and complete PR change set =='
base="$(git merge-base HEAD origin/"$(gh pr view 363 --repo ContextualWisdomLab/aFIPC --json baseRefName --jq .baseRefName)")"
echo "MERGE_BASE=$base"
git diff --no-ext-diff --name-status "$base"...HEAD
git diff --no-ext-diff --stat "$base"...HEAD
git diff --no-ext-diff --unified=40 "$base"...HEAD -- R/aFIPC.R tests/testthat/test-package-version-banner.R tests/testthat/test-fixed-parameter-calibration.R

echo '== Version-banner regression =='
cat -n tests/testthat/test-package-version-banner.R

echo '== Calibration regression outline and contents =='
ast-grep outline tests/testthat/test-fixed-parameter-calibration.R --items all --view expanded 2>/dev/null || true
cat -n tests/testthat/test-fixed-parameter-calibration.R

echo '== Exact source context for the banner and calibration inputs =='
sed -n '36,140p' R/aFIPC.R
sed -n '500,550p' R/aFIPC.R

echo '== Repository-owned version references, excluding vendored packrat =='
rg -n -i -g '!packrat/**' \
  -e 'packageVersion\s*\(\s*["'\'']aFIPC["'\'']\s*\)' \
  -e 'aFIPC[[:space:]]+[0-9]+\.[0-9]+' \
  -e '^[[:space:]]*Version:' \
  -e '0\.2' \
  DESCRIPTION R tests man docs README.md 2>/dev/null || true

Length of output: 35536


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="ContextualWisdomLab/aFIPC"
sha="3e21ef336e140b36b0a51c956995dbe982050aa6"

echo '== Current pull-request checks =='
gh pr checks 363 --repo "$repo" --watch=false || true

echo '== Current check-run status =='
gh api "repos/$repo/commits/$sha/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name, .status, (.conclusion // ""), .details_url] | `@tsv`'

echo '== Failed CodeQL compatibility job details =='
gh run view 34623804785 --repo "$repo" --job 103344388114 --log-failed 2>&1 | tail -n 220 || true

echo '== Dispatched CodeQL workflow state =='
gh run list --repo "$repo" --commit "$sha" --workflow "CodeQL PR" --limit 10 \
  --json databaseId,status,conclusion,displayTitle,createdAt,updatedAt,url

Length of output: 8868


@seonghobae: Source and test review found no code findings.

  • DESCRIPTION remains the package-version authority. It declares Version: 0.1.0.
  • autoFIPC() now derives the banner version from utils::packageVersion("aFIPC").
  • No separate runtime version registry or hard-coded 0.2 remains in repository-owned package code.
  • The focused regression captures the first banner message and requires it to equal the installed package version. It also preserves the existing input-validation error expectation.
  • The PR changes no calibration logic. It also does not change the fixed-parameter calibration regression.

Gate verification is incomplete for commit 3e21ef336e140b36b0a51c956995dbe982050aa6.

  • quality, Semgrep, Trivy, Scorecard, and secret/workflow checks passed.
  • R CMD check, Noema, and Strix are still in progress.
  • CodeQL compatibility analysis (actions) failed. The job log was unavailable through GitHub CLI during review.

Keep the PR Draft until the pending checks complete and the CodeQL failure is resolved or superseded by a successful current-head CodeQL result.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Labels

bug priority: high High-priority or P1 work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant