Skip to content

fix(profile): fail unavailable source observations explicitly - #25

Merged
4444J99 merged 1 commit into
mainfrom
fix/profile-source-observation
Sep 9, 2026
Merged

fix(profile): fail unavailable source observations explicitly#25
4444J99 merged 1 commit into
mainfrom
fix/profile-source-observation

Conversation

@4444J99

@4444J99 4444J99 commented Sep 9, 2026

Copy link
Copy Markdown
Member

The profile refresh currently returns success when its source cannot be fetched or is invalid. That makes HTTP failures look like confirmed projection parity and hides a stale organization profile.

This repair distinguishes observed parity/successful update (exit 0), observed drift in check mode (exit 1), and unavailable or invalid source (exit 2). Failure preserves the current profile and stops the existing workflow before its commit step. The existing CI job now runs seven regressions covering HTTP/transport/decode failure, invalid content, drift, parity, successful update, and preservation of the independently owned portfolio-hub block.

Validation: seven stdlib tests pass; git diff --check passes. A live --check returned exit 2 with HTTP 404 and left the profile unchanged. This is an unavailable source observation, not current projection parity. Source access must be repaired through an authorized publication/access path; no credential or public identity copy is changed by this PR.

Refs 4444J99/limen#2214. This technical prerequisite does not close PSP-P07-W02 or approve public identity publication. Rollback: revert this scoped commit; profile content is untouched.

Summary by CodeRabbit

  • Bug Fixes

    • Profile refreshes now fail when the configured source is unavailable, private, invalid, or cannot be read.
    • Unavailable sources no longer appear as matching content or authorize profile updates.
    • Failed refreshes leave the existing profile unchanged.
    • Check mode now clearly reports detected drift with an appropriate failure status.
  • Tests

    • Added coverage for source failures, invalid content, drift detection, successful updates, and preventing unintended profile creation.

Copilot AI lite review requested due to automatic review settings September 9, 2026 12:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T12:42:14.814199Z 049f994 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3025b35e-8af0-43d7-99ce-abfa952c7474

📥 Commits

Reviewing files that changed from the base of the PR and between fdc51e6 and 049f994.

📒 Files selected for processing (4)
  • .github/workflows/ci-minimal.yml
  • .github/workflows/refresh-profile.yml
  • scripts/refresh-profile.py
  • tests/test_refresh_profile.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The profile refresh now treats unavailable or invalid source content as a failure, preserves the profile, documents exit codes, adds outcome tests, and runs those tests in minimal CI.

Changes

Profile refresh behavior

Layer / File(s) Summary
Refresh outcome handling
scripts/refresh-profile.py, tests/test_refresh_profile.py
The script returns exit code 2 for unavailable or invalid source content instead of reporting success. Tests cover fetch failures, validation, drift, parity, updates, and profile preservation.
Workflow guidance and CI validation
.github/workflows/refresh-profile.yml, .github/workflows/ci-minimal.yml
Workflow comments describe the accessible-source requirement. Minimal CI runs the profile refresh test suite.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 049f9

Profile refresh now preserves the existing profile when its source is unavailable or invalid, while retaining explicit outcomes for drift, parity, and successful updates. The implemented behavior and CI coverage indicate no remaining merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 2 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: unavailable profile-refresh sources now fail explicitly instead of being treated as successful observations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/profile-source-observation

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The job was not started because the account is locked due to a billing issue.

4444J99 commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Verification at 049f99454a2bed09fb0ee6e77498d51db780a4dd: all four published files were fetched back at the immutable commit and match the independently reviewed local bytes. Seven stdlib regressions pass; Python syntax, workflow YAML, and whitespace checks pass. Independent review found no remaining technical blocker.

Hosted CI has not executed: validate job 102468409578 reports failure with no steps. The Copilot review receipt explicitly reports an account billing lock. This is an infrastructure/startup blocker, not a source-test failure or a hosted pass.

The default source remains unavailable (observed HTTP 404 / exit 2); no profile publication occurred. The paired source-owner correction is organvm/organvm-corpvs-testamentvm#554.

@4444J99
4444J99 merged commit c6f8b9c into main Sep 9, 2026
1 of 9 checks passed
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.

2 participants