Skip to content

test(apps): install and update a published release with approved capabilities - #599

Merged
RentnerKev merged 2 commits into
mainfrom
rentner/test/published-greeting-grants
Nov 27, 2026
Merged

RentnerKev merged 2 commits into
mainfrom
rentner/test/published-greeting-grants

Conversation

@RentnerKev

@RentnerKev RentnerKev commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Summary

PR 2 of 3 for #590. The published-app reference gate now installs signed releases that request capabilities, on AMD64 and ARM64, through the real app manager and catalog UI. It covers the acceptance criterion "the published-app reference gate installs a fixture release with capabilities on AMD64 and ARM64".

New gate published_greeting/grants.rs (--grants, evidence greeting-grants.json)

  • Three releases repackage the official Greeting 1.0.1 archive, each with its own signed catalog revision:
    • 1.1.0 and 1.2.0 request notifications.publish.v1 and proxy.hosts.read.v1;
    • 1.3.0 also requests diagnostics.upstream.probe.v1.
  • The authority stub records every grant publication. One fresh appliance state checks:
    1. Install: the listing shows the requested grants. A missing, unrequested or incomplete approval is refused with 422, before any archive download or grant publication. The approved install (two proxy hosts) publishes exactly that set to its generation.
    2. Carried update: 1.2.0 requests nothing new, so it updates without an approval and keeps the set.
    3. Widened update: 1.3.0 needs an approval. Without one, or with the carried one, it is refused with 422: no download, no publication, no candidate, same generation and grants. The approved update publishes the new set.
    4. Revoke: revoking one host replaces the grants of the live generation without a restart. A second revoke of the same grant gets 409.
    5. Rollback: 1.2.0 comes back with its stored approval, which has lost the revoked host too.
    6. Restart: the manager publishes the same set again, and 1.3.0 is still offered as needing approval.
    7. Reinstall: after an uninstall, reinstalling 1.3.0 is refused without an approval and then publishes the newly selected hosts. The retained greeting is still there.

Shared helpers

  • The repackaging helpers move from data_migrations.rs into published_greeting/repackage.rs, so both gates share them. A release now sets arbitrary manifest fields and adds its own files. The migrations gate behaves as before.
  • start_authority takes an optional grant log for the authority stub.

Related issue

Refs #590 (PR 2 of 3). PR 3 adds the approval dialog, host picker and revoke UI.
Refs RentnerProxy/app-monitoring#1

Type of change

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • CI / tooling
  • Dependency update
  • Other: reference gate test

Testing

  • Rust, in Kiri (Rust 1.99.1): cargo fmt --check and cargo clippy --locked --all-targets --all-features -- -D warnings are clean. cargo test --all-features: 1123 passed, 27 ignored.
  • Privileged fixtures, in Kiri on AMD64 with the historical fixture appliance and this revision's controller:
    • --grants passed in 71 s. It recorded nine publications across eight generations, including the live revoke.
    • --migrations passed after the helper move.
  • CI runs both modes natively on AMD64 and ARM64 in the app runtime reference job, with the appliance built from this revision, and uploads greeting-grants.json. Both architectures passed on the first commit.
  • The coverage run skips --grants: the Rust job already uses 17 to 19 of its 20 minutes on main, and the instrumented gate (148 s) pushed it over the limit. The signed lifecycle covers the same manager paths under coverage.

Checklist

  • I tested the relevant functionality.
  • Existing tests pass. (CI pending)
  • I added or updated tests where appropriate.
  • This PR does not include secrets, credentials, production data, or private certificates/keys.
  • I updated documentation where necessary. Not needed.
  • I linked the relevant issue for a feature or fix, or explained why no issue is needed.

Breaking changes

None.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Expanded lifecycle coverage for capability grants in published Greeting releases, including approval before installation, renewed approval when requested capabilities change, and grant revocation.
    • Added checks for grant behavior through updates, rollback, manager restart, and reinstall.
    • Fixture runs now include the grants test and require its evidence report.
    • Native runtime verification now includes approved capabilities, with grant evidence included in workflow artifacts.

…bilities

Add the --grants reference gate. Three releases repackaged from the
official Greeting 1.0.1 archive request notifications, proxy host reads
and upstream probes. One fresh appliance state installs with the Owner's
approval, carries it to an update, refuses an update that requests more
until it is approved, revokes a host from the live generation, rolls
back, restarts and reinstalls, while the authority stub records every
grant publication. CI runs it on AMD64 and ARM64 and uploads
greeting-grants.json.

Move the repackaging helpers into a module shared with the data
migrations gate.

Refs #590

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds a privileged published Greeting grants lifecycle test. It adds shared release-repackaging helpers and wires the test and its JSON evidence report into the CI fixture and workflow.

Changes: Published Greeting grants lifecycle

Layer / File(s) Summary
Shared release fixture and authority setup
core/tests/private/app_manager/lifecycle/published_greeting/repackage.rs, core/tests/private/app_manager/lifecycle/published_greeting/data_migrations.rs, core/tests/private/app_manager/lifecycle/published_greeting.rs, core/tests/private/app_manager/lifecycle/published_greeting/distribution_gates.rs, core/tests/private/app_manager/lifecycle/published_greeting/portable_backup.rs
Shared helpers repackage and offer signed Greeting releases. The migration test uses these helpers, and authority setup accepts an optional grant-log path.
Grant approval and release updates
core/tests/private/app_manager/lifecycle/published_greeting/grants.rs
The test checks approval requirements for installation and updates, including an update that adds a requested capability.
Revocation, rollback, restart, and reinstall
core/tests/private/app_manager/lifecycle/published_greeting/grants.rs
The test checks grant revocation and behavior across rollback, manager restart, and reinstall. It writes lifecycle and grant-publication evidence to JSON.
CI execution and evidence upload
.github/scripts/ci/fixtures/app-greeting-lifecycle.sh, .github/workflows/app-runtime-reference.yml
The fixture script runs the grants test and checks its report. The workflow uploads the report and includes approved capabilities in its verification label.

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

Change: Other

Possibly related issues

  • RentnerProxy/platform issue 590 — The PR tests refusal when approval is missing or insufficient and exercises grant changes across lifecycle operations. The issue also covers the approval dialog, which this PR does not implement.

Possibly related PRs

  • RentnerProxy/platform#569 — Both PRs update the published Greeting grants fixture and CI wiring, and check grant-publication records.
Merge Risk: Minimal · up to 8afc1

This change adds a test and CI evidence gate for the published Greeting capability grants lifecycle. It does not change production behavior. No concrete merge-blocking risk was identified, and native CI results are still pending.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "test(apps): install and update a published release with approved capabilities" matches the main change: a new privileged reference gate (grants.rs) that installs and updates published Greet…
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.
Description check Passed The description follows the repository template closely and covers its sections: Summary, Related issue, Type of change, Testing, Checklist, and Breaking changes. It explains the new grants reference …
Full details: Title check

Explanation

The title "test(apps): install and update a published release with approved capabilities" matches the main change: a new privileged reference gate (grants.rs) that installs and updates published Greeting releases requesting capabilities, with approvals. It omits the revoke, rollback, restart and reinstall coverage and the shared-helper refactor, but it still names a real and central aspect of the changeset.

Full details: Description check

Explanation

The description follows the repository template closely and covers its sections: Summary, Related issue, Type of change, Testing, Checklist, and Breaking changes. It explains the new grants reference gate, the shared repackaging helpers, and the start_authority change. It reports concrete test runs on AMD64 and states that CI is still pending for ARM64. The Screenshots section is omitted, which is acceptable for a CI/test change. The Related issue section cites Refs #590 with a reason, which fits the template. The checklist marks 'Existing tests pass' as unchecked, which is accurate since CI is pending. Minor gaps: it does not list an explicit approach for the coverage-run exclusion beyond a note, and the Testing section reports results from a single environment, but the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 23d00f8 and 8afc1bf.

Files selected for processing: 1

  • .github/scripts/ci/fixtures/app-greeting-lifecycle.sh

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

The Rust job already needs 17 to 19 of its 20 minutes on main, and the
instrumented grants gate pushed it over the limit. The native reference
job runs the gate on AMD64 and ARM64, and the signed lifecycle covers
the same manager paths under coverage.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@RentnerKev
RentnerKev merged commit b250842 into main Nov 27, 2026
49 checks passed
@RentnerKev
RentnerKev deleted the rentner/test/published-greeting-grants branch November 27, 2026 15:31
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.

1 participant