Skip to content

CFE-4681: document timer_policy attribute on classes: promises#3682

Open
nickanderson wants to merge 1 commit into
cfengine:masterfrom
nickanderson:CFE-4681/master
Open

CFE-4681: document timer_policy attribute on classes: promises#3682
nickanderson wants to merge 1 commit into
cfengine:masterfrom
nickanderson:CFE-4681/master

Conversation

@nickanderson

@nickanderson nickanderson commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

Documents the new timer_policy attribute on classes: promises in the promise-type reference (CFE-4681).

timer_policy controls whether a persistent class restarts its timer when rediscovered:

  • reset — re-evaluates the promise and restarts the timer, so the class keeps persisting while the policy runs and the expression stays true.
  • absolute — preserves the original expiry; the promise is skipped while the class is already defined.

This brings the classes: promise type to parity with the classes body, which has long had a timer_policy attribute.

Version-specific default

The new section documents the default as reset (master → 3.28.0) and a History note records that the attribute is also available on 3.24.5 and 3.27.2, where the default is absolute (preserving the historical behavior).

Notes

  • Added under ### timer_policy in content/reference/promise-types/classes.markdown, right after ### persistence.
  • Cross-references use the auto-generated heading anchors ([classes#persistence], [Promise types#timer_policy], [Promise types#persist_time]); no _references.md change needed.
  • prettier --check passes; no inline .markdown links introduced.

Related

Once this looks right on master, it should be cherry-picked to the 3.24 and 3.27 doc branches with the Default value and the History note adjusted to absolute for those streams.

Merge with cfengine/core#6174

Documents the timer_policy attribute on classes: promises (CFE-4681),
which controls whether a persistent class restarts its timer when
rediscovered. The default is reset on master (3.28.0); the attribute is
also available on 3.24.5 and 3.27.2, where the default is absolute.

Ticket: CFE-4681
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nickanderson

Copy link
Copy Markdown
Member Author

Failing attribute check until cfengine/core#6174 is merged.

@nickanderson nickanderson requested a review from olehermanse June 11, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant