Skip to content

[CI only] PR 2 full stack on e00b8990b (fixes + files + packages) - #46

Closed
djbclark wants to merge 15 commits into
masterfrom
simulate-json-packages
Closed

djbclark wants to merge 15 commits into
masterfrom
simulate-json-packages

Conversation

@djbclark

@djbclark djbclark commented Oct 9, 2026

Copy link
Copy Markdown
Owner

CI only; the reviewed PR is #41.

Replaces #42, which GitHub cannot reopen because the head branch was force-pushed. Upstream's workflows run only on PRs into master, so the stacked #41 (base simulate-json-files) gets no full run. Close once CI is green.

🤖 Generated with Claude Code

victormlg and others added 14 commits September 30, 2026 17:16
Signed-off-by: Victor Moene <victor.moene@northern.tech>
GetProcessStat() asserted on unexpected open() errors, e.g. when the
process exited in the meantime. Release builds would loop forever
instead. Now logs the error and returns false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ticket: CFE-4285
Changelog: Title
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
CFE-4285: Fixed cf-agent assertion failure when reading /proc/<pid>/stat
…ions.c

Linked TODOs to new tickets to fix old bugs/TODOs that were already in cf-agent
before moving the code.

Signed-off-by: Victor Moene <victor.moene@northern.tech>
Better concurrency for cf-reactor static state
- No need for map anymore, since watcher keeps track of the promise
- No need to keep key as variable anymore, since we do not use a map
- No need to run bundle inside watcher.c
- No risk of running a bundle from a wrong key between policy reads

Signed-off-by: Victor Moene <victor.moene@northern.tech>
Promises are skipped to prevent running them several times. However, on event, we want to run them every single time:
- we clear the promise lock cache
- we set the default if_elapsed time for bundles run from an events promise to be 0, so it doesn't skip the promises.

Fixed also connection cache and custom promise prologue and epilogue. Clear function cache before "then" bundle run

Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
- Moved mod_methods.c's MethodsParseTreeCheck implementation to PromiseCheckBundleCallArity
in policy.c, and made it more generic
- Now, MethodsParseTreeCheck and EventsParseTreeCheck both call this new function when calling bundles

Signed-off-by: Victor Moene <victor.moene@northern.tech>
RecordPkgOperationInChroot() wrote the architecture before the version,
the reverse of the order its readers expect.

Ticket: none
Changelog: Title
Signed-off-by: Daniel JB Clark <djbclark@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A recorded removal with a version was only reported when it cancelled a
recorded installation of the same version.

Ticket: none
Changelog: Title
Signed-off-by: Daniel JB Clark <djbclark@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…talls

DiffPkgOperations() compared the versions of two recorded installations
of the same package without checking that both were set, which
PkgVersionIsGreater() asserts. The diff report now keeps the record the
way the manifest report does: a versioned record over an unversioned
one, otherwise the higher version, otherwise the first one recorded.

Ticket: none
Changelog: Title
Signed-off-by: Daniel JB Clark <djbclark@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
With --simulate-json=FILE, cf-agent also writes the files and renames of
a --simulate run to FILE as one JSON document, together with whether the
run fell back to the failsafe policy or was aborted. Under manifest-full
the JSON lists only the changed files, not the kept ones.

Ticket: none
Changelog: Title
Signed-off-by: Daniel JB Clark <djbclark@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PkgOperationRecord now stores the package fields and the simulate modes
format their messages when printing, so that the reduction can be reused
by other renderers.

Ticket: none
Changelog: None
Signed-off-by: Daniel JB Clark <djbclark@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@cursor cursor Bot 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.

Approved. Cursor Bugbot was not present after the first check poll, so that signal was skipped, and no approval policy requires human review. There is no prior approval from this automation to keep or dismiss.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

The "packages" array lists each package that a --simulate run would
install or remove, with its version and architecture when known. It
always carries that install/remove reduction, under --simulate=manifest
as well.

Ticket: none
Changelog: Title
Signed-off-by: Daniel JB Clark <djbclark@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@djbclark
djbclark force-pushed the simulate-json-packages branch from 312c466 to e00b899 Compare October 9, 2026 04:50
@djbclark djbclark changed the title [CI only] PR 2 full stack on 312c466a7 (fixes + files + packages) [CI only] PR 2 full stack on e00b8990b (fixes + files + packages) Oct 9, 2026
@djbclark djbclark closed this Oct 9, 2026
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.

3 participants