Skip to content

feat: expose process administration - #40

Merged
cardmagic merged 2 commits into
mainfrom
fix/administration-process-query-ruby
Aug 17, 2026
Merged

feat: expose process administration#40
cardmagic merged 2 commits into
mainfrom
fix/administration-process-query-ruby

Conversation

@cardmagic

Copy link
Copy Markdown
Owner

Summary

  • add SolidObjects.administration.processes for authorized process inspection
  • return frozen process snapshots with live/stale status through the runtime database adapter
  • cover same-process warning behavior and document rolling-deployment overlap
  • prepare the gem as 0.13.2 to match the Node package

Root cause

The polling-only warning is evidence-based. ProcessRegistry only emits it when a live process row has a different hostname or PID. Component rows in one Ruby process do not trigger it; a rolling deployment or recently uncleanly stopped process can legitimately remain live during the configured heartbeat window.

The administration query gives operators a supported, authorization-guarded way to inspect those rows without opening a competing SQLite connection.

Verification

  • focused administration and polling tests
  • bundle exec rake — 521 runs, 1,742 assertions, 0 failures/errors, 15 skips
  • Standard and RuboCop — 209 files, no offenses
  • RBS generation/validation and Steep
  • Brakeman — zero warnings

Provide an authorization-guarded process query through the runtime database adapter so operators can inspect live and stale rows without opening a competing SQLite connection. Keep the polling warning evidence-based and document rolling-deployment overlap.
@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown

Greptile Summary

The PR exposes authorization-guarded process inspection through SolidObjects.administration.processes and prepares version 0.13.2.

  • Returns deeply frozen process snapshots with current stale status.
  • Documents rolling-deployment and unclean-shutdown warning behavior.
  • Adds administration and same-process polling regression coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
lib/solid_objects/administration.rb Adds authorized process inspection and now deep-freezes nested metadata, resolving the previous mutability finding.
lib/solid_objects.rb Exposes and resets the memoized administration facade.
test/integration/administration_test.rb Verifies authorization, liveness reporting, and deep immutability of nested process metadata.
test/integration/polling_test.rb Adds coverage ensuring rows for the current hostname and PID do not produce cross-process warnings.
docs/operations.md Documents process overlap, stale heartbeat behavior, and supported administration inspection.

Reviews (2): Last reviewed commit: "fix: freeze process metadata" | Re-trigger Greptile

Comment thread lib/solid_objects/administration.rb Outdated
Deep-freeze metadata returned by process administration so nested values cannot mutate a published snapshot. Add a regression test for nested mutation.
@cardmagic cardmagic self-assigned this Aug 17, 2026
@cardmagic

Copy link
Copy Markdown
Owner Author

The one review finding on this PR was already fixed by 4682da5 before I looked; its thread was still open but marked outdated, so I verified the fix rather than take that on trust, and have resolved it.

Nested metadata remains mutable (P1)

Fixed at head. Administration#processes builds the snapshot with:

metadata: Serialization.readonly_copy(process_record.metadata),

and readonly_copy is freeze_recursively(deep_copy(value)), so it freezes a copy all the way down rather than freezing only the outer hash.

Confirmed by running the exact mutation the finding described against this branch:

metadata frozen: true
nested frozen:   true
array frozen:    true
MUTATION REFUSED (fixed)

test/integration/administration_test.rb passes (2 runs, 8 assertions), and every check on the PR is green.

Nothing else is outstanding: Greptile is at 5/5 with "no blocking failure remains", and this was the only review thread.

@cardmagic
cardmagic marked this pull request as ready for review August 17, 2026 16:25
@cardmagic
cardmagic merged commit 07d180d into main Aug 17, 2026
29 checks passed
@cardmagic
cardmagic deleted the fix/administration-process-query-ruby branch August 17, 2026 16:25
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