Skip to content

Add deployment confirm timeout - #2

Merged
josesimoes merged 1 commit into
mainfrom
add-timeout-attrib
Oct 13, 2026
Merged

josesimoes merged 1 commit into
mainfrom
add-timeout-attrib

Conversation

@josesimoes

Copy link
Copy Markdown
Member

Description

  • Add attribute.
  • Update docs and sample app.

Motivation and Context

  • Hardening IFU sequence to prevent a bad deployment from keeping a device lingering with a bad deployment image.

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

- Add attribute.
- Update docs and sample app.
@nfbot nfbot added Type: enhancement New feature or request Type: documentation Improvements or additions to documentation labels Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: nanoframework/coderabbit/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 9ff668cb-6ff8-4b05-b5ec-d7640157ca02
📥 Commits

Reviewing files that changed from the base of the PR and between 27a24bf and 09c2c7f.

📒 Files selected for processing (7)
  • README.md
  • Samples/IFU_blink-app/Program.cs
  • Samples/IFU_blink-app/README.md
  • docs/confirm-and-revert.md
  • docs/overview.md
  • nanoFramework.Runtime.InFieldUpdate/DeploymentConfirmationTimeoutAttribute.cs
  • nanoFramework.Runtime.InFieldUpdate/nanoFramework.Runtime.InFieldUpdate.nfproj

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

📝 Summary

Summary by CodeRabbit

  • New Features

    • Added a configurable confirmation timeout for test deployments. On supported ChibiOS devices using MCUboot, an unconfirmed deployment resets after the timeout and reverts to the previous version.
    • Set the timeout to 0 or omit it to disable the countdown. Unsupported platforms ignore the setting.
  • Documentation

    • Added guidance and sample instructions for configuring the timeout and testing automatic recovery.

Adds a public attribute that sets a deployment confirmation timeout. Updates the documentation and sample to describe and demonstrate timeout behavior.

Changes: Deployment confirmation timeout

Layer / File(s) Summary
Add the timeout attribute
nanoFramework.Runtime.InFieldUpdate/DeploymentConfirmationTimeoutAttribute.cs, nanoFramework.Runtime.InFieldUpdate/nanoFramework.Runtime.InFieldUpdate.nfproj
Adds DeploymentConfirmationTimeoutAttribute with a seconds-based constructor and includes the source file in the project.
Document and demonstrate timeout behavior
docs/confirm-and-revert.md, docs/overview.md, README.md, Samples/IFU_blink-app/Program.cs, Samples/IFU_blink-app/README.md
Documents timeout behavior and platform support. The sample applies a 60-second timeout and describes how to observe reset and reversion when confirmation is omitted.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested labels: Type: enhancement, Type: documentation

Merge Risk: ⚪ Minimal · up to 09c2c

This PR adds the timeout API and documentation, but its runtime behavior depends on firmware outside this repository. No PR-specific failure is verified, and the two broken sample links are unchanged from the merge base.

Pre-merge checks · Passed 4
Passed Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title is concise, descriptive, under 50 characters, and does not end with a full stop. It accurately summarizes the deployment confirmation timeout change.
Description check Passed The description directly covers the new attribute, documentation, sample app, and motivation for hardening the IFU deployment sequence.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • 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

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

@sonarqubecloud

Copy link
Copy Markdown

@nfbot

nfbot commented Oct 13, 2026

Copy link
Copy Markdown
Member

⚠️ Native declaration update required!

The native contract hash of nanoFramework.Runtime.InFieldUpdate has changed. The native declaration in nf-interpreter must be updated before this package can be released.

Previously published This build
Native contract hash N/A 0xC98E9AB7

👉 Tracking issue: nanoframework/Home#1932

The issue contains a link to the stubs artifact from this build and instructions for GitHub Copilot to perform the update.

@josesimoes
josesimoes merged commit 57ab9ba into main Oct 13, 2026
6 of 7 checks passed
@josesimoes
josesimoes deleted the add-timeout-attrib branch October 13, 2026 13:23
josesimoes added a commit to nanoframework/nf-interpreter that referenced this pull request Oct 14, 2026
- Add implementation in MCUboot start policy.
- Add interface and hard implementation for ChibiOS.
- Adjust debugger and startup to call these.
- Updated docs.
- Updated IFU assembly declaration.

- Following nanoframework/nanoFramework.Runtime.InFieldUpdate#2
- Closes nanoframework/Home#1932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: documentation Improvements or additions to documentation Type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants