Develop v2.0 - #136
Conversation
改动重点: - Add pure routing for every reserved 2.0 verb, legacy and explicit TUI forms, and deterministic option errors. - Probe remote module availability before legacy loading so the TUI starts exactly once on preinstalled and loaded targets. 验证: - Ran rebar3 fmt. - Ran rebar3 as test eunit --module=observer_cli_cli_test,observer_cli_escriptize_test,observer_cli_start_test (68 tests, 0 failures). - Ran rebar3 eunit (417 tests, 0 failures). - Ran rebar3 compile and rebar3 as ci compile. - Ran git diff --check and git diff --cached --check.
改动重点: - Add the versioned response envelope, stable error classes, text and consultable term encoders, dynamic OTP JSON encoding, one-MiB output enforcement, and terminal-safe dynamic text. - Route new command failures through explicit exit codes 0 through 4 while preserving the legacy TUI return path. 验证: - Ran rebar3 fmt and rebar3 as test eunit --module=observer_cli_cli_test,observer_cli_escriptize_test (58 tests, 0 failures). - Ran rebar3 eunit (424 tests, 0 failures), rebar3 compile, rebar3 as ci compile, and rebar3 xref. - Ran rebar3 escriptize with term and misplaced-global-option subprocess checks, plus git diff --check and git diff --cached --check.
改动重点: - Validate bounded node names, deadlines, and explicit cookie environment or file sources without exposing cookie values. - Start a dynamic hidden outbound-only controller, replace its default cookie with cryptographic randomness before assigning the target cookie, and require the version 1 target capabilities handshake. - Add disposable-node coverage for pre-distributed refusal, random failure ordering, hidden and listener-free state, and missing or incompatible target modules. 验证: - Ran rebar3 fmt and rebar3 as test eunit --module=observer_cli_cli_test,observer_cli_snapshot_test,observer_cli_escriptize_test (67 tests, 0 failures). - Ran disposable short-name and long-name escript probes; both reached the installed handshake and returned the expected command_unavailable result without emitting the cookie. - Ran rebar3 eunit (433 tests, 0 failures), rebar3 compile, rebar3 as ci compile, rebar3 xref, git diff --check, and git diff --cached --check.
改动重点: - Run target probes in linked monitored workers with an earlier deadline, max-heap boundary, controller monitoring, stable failure classes, and confirmed cleanup. - Normalize and redact report terms into capped JSON-safe data while preserving required JSON Pointer evidence during bounded item truncation. - Cover timeout, crash, max-heap, invalid UTF-8, field and response caps, evidence pointers, and controller disconnect outcomes. 验证: - Ran rebar3 as test eunit --module=observer_cli_snapshot_test,observer_cli_cli_test (24 tests, 0 failures). - Ran rebar3 eunit (439 tests, 0 failures), rebar3 compile, rebar3 as ci compile, rebar3 xref, rebar3 fmt, git diff --check, and git diff --cached --check.
改动重点: - Capture versioned runtime, resource limit, memory, IO, GC, scheduler, and peer facts without full resource enumeration. - Route redacted snapshot envelopes through local and remote escript execution with partial-report exit precedence. 验证: - Ran the focused snapshot, CLI, and escript EUnit suite with 78 tests and 0 failures. - Ran local and disposable remote snapshot smokes, 444 full EUnit tests, compile, CI compile, xref, format, and diff checks.
改动重点: - Add connect, fresh status, and idempotent disconnect on the shared stateless probe transport. - Store only validated target and cookie-source metadata in bounded safe ETF with strict permissions and atomic replacement. 验证: - Ran rebar3 fmt and the focused CLI/escript EUnit suite with 72 tests and 0 failures, including disposable-node lifecycle probes. - Ran 449 full EUnit tests, rebar3 compile, rebar3 as ci compile, and git diff --check.
改动重点: - Expose bounded memory, scheduler wall-time, and public distribution inspection through the shared snapshot protocol. - Validate scheduler duration and deadline coupling, invalidate unsafe measurement windows, and report controller queue capability without private distribution APIs. 验证: - Ran rebar3 fmt and focused snapshot/CLI EUnit checks with 36 tests and 0 failures. - Ran a constrained real scheduler fixture with two normal and one dirty CPU scheduler online. - Ran 454 full EUnit tests, rebar3 compile, rebar3 as ci compile, rebar3 xref, and git diff --check.
改动重点: - Add bounded iterator and list process inventories, exact stable Top-N windows, safe detail resolution, and public application attribution. - Enforce inspection option contracts and audit admission, lifecycle, exclusions, baselines, and working-set estimates. 验证: - Pass the focused 117-test EUnit suite and the full 463-test EUnit suite. - Pass admitted and refused 5,050/100,055-process fixtures, formatting, compile, CI compile, xref, and git diff --check.
改动重点: - Inspect ETS and local Mnesia metadata with staged admission, raw generation correlation, correct storage units, deterministic Top-N sorting, and lifecycle-safe states. - Validate table command options and cover generation races, distinct Mnesia states, and exact main-table evidence without reading rows. 验证: - Ran the focused ETS, Mnesia, snapshot, and CLI EUnit suite with 72 tests and 0 failures. - Ran disposable 100001-table ETS and 10001-local-table Mnesia admission fixtures. - Ran rebar3 fmt, 471 full EUnit tests, rebar3 compile, rebar3 as ci compile, rebar3 xref, and git diff --check.
改动重点: - Inspect VM and legacy inet network counters, documented Port metadata, and registry-known Socket counters with bounded Top-N acquisition and raw identity correlation. - Apply fixed total and delta formulas with explicit lifecycle, reset, shape-change, missing-core, optional-sendfile, enumeration, and registry coverage states. - Validate command sort, limit, duration, and timeout contracts without changing existing TUI collectors. 验证: - Ran rebar3 fmt and the focused five-module EUnit suite with 132 tests and 0 failures. - Ran disposable network, Port, and Socket total and bounded-delta fixtures. - Ran rebar3 eunit with 481 tests and 0 failures, rebar3 compile, rebar3 as ci compile, rebar3 xref, and git diff --check.
改动重点: - Compose process, application, ETS, Mnesia, network, Port, and Socket probes with fixed defaults, shared deadlines and identifiers, observer exclusions, admission evidence, and partial cleanup semantics. - Restrict --deep to snapshot and cover admitted, refused, timed-out, heap-limited, and controller-disconnected captures. 验证: - Ran rebar3 fmt and the focused snapshot and CLI EUnit suite with 51 tests and 0 failures. - Ran rebar3 eunit with 488 tests and 0 failures, rebar3 compile, rebar3 as ci compile, rebar3 xref, and git diff --check.
改动重点: - Add strict local target admission, bounded target-side value-free state shaping, explicit High-risk copy and late-request warnings, and parser coverage for gen-server-state. - Cover secret redaction, not-found targets, depth, node, and size caps, timeout late execution, callback failure, max-heap cleanup, and default-command exclusion. 验证: - Passed focused 57-test EUnit, full 494-test EUnit with a temporary inetrc for local hostname resolution, rebar3 compile, rebar3 as ci compile, rebar3 xref, formatting, and git diff --check.
改动重点: - Query the local EPMD daemon through localhost so the listener-free controller assertion does not depend on machine hostname resolution. - Keep the production handshake unchanged and limit the fix to the existing dynamic controller test. 验证: - Ran rebar3 as test eunit --module=observer_cli_escriptize_test (52 tests, 0 failures). - Ran rebar3 fmt, rebar3 eunit (494 tests, 0 failures), and git diff --check.
改动重点: - Resolve loaded application supervisor roots through public OTP APIs and report only bounded direct-child metadata with safe identity handling. - Reject arbitrary supervisor and recursion options while documenting non-atomic, O(children), soft-cap, and late-execution boundaries. - Cover static and dynamic supervisors, public outcome shapes, remote and restarting children, ambiguous IDs, scan refusal, redaction, and output caps. 验证: - Passed rebar3 as test eunit --module=observer_cli_snapshot_test,observer_cli_cli_test,observer_cli_application_test (76 tests). - Passed disposable static and dynamic supervisor fixtures within observer_cli_application_test. - Passed rebar3 eunit (499 tests), rebar3 compile, rebar3 as ci compile, rebar3 xref, rebar3 fmt, and git diff --check.
改动重点: - Add the default two-point diagnose capture with admitted shared process facts, versioned count-to-limit findings, stable reductions context, redacted evidence, and complete or partial semantics. - Route diagnose through the command parser and escript dispatcher with validated exit codes 0, 1, 3, and 4 while preserving existing TUI behavior. 验证: - Ran rebar3 as test eunit --module=observer_cli_diagnostic_test,observer_cli_snapshot_test,observer_cli_cli_test (64 tests, 0 failures). - Ran real escript subprocess coverage for diagnose exits 0, 1, 3, and 4 through observer_cli_escriptize_test. - Ran rebar3 eunit (506 tests, 0 failures), rebar3 compile, rebar3 as ci compile, rebar3 xref, rebar3 fmt, git diff --check, and git diff --cached --check.
改动重点: - Add validated five-point observation, seven-point deep, and one-level application sampling with monotonic targets, gap accounting, bounded trend collection, and independently admitted final binary-holder context. - Publish scheduler pressure only from two consecutive topology-stable low-cost windows, keep uncalibrated growth evidence context-only, and preserve partial-report exit precedence. 验证: - Ran focused diagnostic, snapshot, CLI, and dynamic-supervisor EUnit fixtures; ran constrained-scheduler, sampling-gap, and deep-holder disposable VM fixtures. - Ran rebar3 fmt, rebar3 eunit (511 tests), rebar3 compile, rebar3 as ci compile, rebar3 xref, git diff --check, and final allowed-path, secret, unbounded-acquisition, and forbidden-GC inspections.
改动重点: - Add exact-MFA and local-PID trace admission with bounded count or rate capture, ACK-based draining, and recon 2.5.6 capability gating. - Add owner-aware global stop, conservative emergency cleanup, fixed-name and trace-state verification, and explicit forced-loss reporting. - Add trace CLI validation, target dispatch integration, and lifecycle fixtures for natural, forced, collision, failure, and cleanup paths. 验证: - Ran rebar3 fmt. - Ran focused EUnit on observer_cli_trace_test and observer_cli_cli_test, including a disposable named node. - Ran rebar3 eunit with 524 tests passing. - Ran rebar3 compile, rebar3 as ci compile, rebar3 xref, and git diff --check.
改动重点: - Update the OTP 29 CI matrix entry from rebar3 3.26 to 3.27. - Keep older OTP matrix entries unchanged while avoiding the pre-1980 escript timestamp warnings fixed in rebar3 3.27. 验证: - Ran git diff --check successfully. - Rebuilt the observer_cli escript locally with rebar3 3.27 and confirmed the timestamp warnings were absent. - Ran the generated escript with --help and confirmed it exited successfully.
改动重点: - Treat remote group leader PIDs as unattributed before calling local-only process_info/2. - Add a regression test proving remote PIDs are counted through the existing no_group path without crashing. 验证: - rebar3 fmt -c src/observer_cli_application.erl - rebar3 fmt -c test/observer_cli_application_test.erl - rebar3 as test eunit --module=observer_cli_application_test (19 tests, 0 failures) - git diff --check and git diff --cached --check
改动重点: - Wire every command-first inspection and trace route through the bounded target dispatcher while preserving the positional TUI path. - Add versioned trace envelopes, end-to-end request conversion checks, TUI parity coverage, deterministic trace activation, and release-gate lint and Dialyzer fixes. - Document supported commands, trust and risk boundaries, OTP 26-29 compatibility, the full cross-node matrix, measured resource budgets, cleanup evidence, and remaining limits. 验证: - Ran rebar3 fmt and the focused five-module EUnit suite (138 tests, 0 failures). - Ran rebar3 eunit (528 tests, 0 failures), rebar3 compile, rebar3 as ci compile, rebar3 xref, rebar3 dialyzer, rebar3 check, and git diff --check. - Ran focused EUnit, compile, and escriptize on OTP 26.2.5.2, 27.3.4.2, 28.5, and 29.0.3; all 16 controller-target snapshot cells passed. - Ran disposable end-to-end command, 10,000 and 100,000 resource admission, 100,000-process recon cleanup, atom-growth, scheduler-flag, and worker-cleanup proofs.
Change highlights: - Pass an explicitly invalid option through the generated escript command. - Preserve the argument-error exit contract without depending on saved active diagnostics context. Verification: - rebar3 fmt --check - rebar3 as test eunit --module=observer_cli_escriptize_test - rebar3 eunit - git diff --check
Change highlights: - Add top-level command groups, target and output option guidance, and duration syntax. - Add command-specific help for every diagnostics command with defaults, ranges, safety notes, and examples. - Document saved-context and explicit-target workflows and correct the connect example syntax. - Cover top-level help and every command help route with focused EUnit assertions. Verification: - rebar3 fmt --check src/observer_cli_escriptize.erl - rebar3 fmt --check test/observer_cli_escriptize_test.erl - rebar3 as test eunit --module=observer_cli_escriptize_test (56 tests, 0 failures in an isolated staged tree) - rebar3 escriptize - Manual escript checks for top-level and trace command help - git diff --cached --check
改动重点: - Enforce command-specific CLI arguments, bounded controller deadlines, strict response schemas, privacy rules, resource wrapper invariants, and exit-code priority. - Correct Quick and observation diagnostics for ETS, Port, Socket, scheduler, trend, replacement, reset, and sampling semantics. - Harden Trace lifecycle cleanup and add adversarial fixtures for helper, dispatcher, formatter, module-reload, busy-session, emergency-stop, and recon-profile boundaries. - Update the design and validation evidence while keeping the release state design-reviewed until the proof runner is tracked. 验证: - Ran rebar3 fmt -c, rebar3 eunit with 571 tests and zero failures, and rebar3 check successfully. - Passed focused 181-test suites, compile, and escriptize on OTP 26.2.5.2, 27.3.4.2, 28.5, and 29.0.3. - Passed the 16/16 controller-target snapshot matrix plus 10k/100k resource and 100k-process Trace cleanup proofs. - Ran git diff --check and git diff --cached --check successfully. - Did not add the temporary release proof commands as a tracked runner; the design remains design-reviewed until that reproducibility gap is closed.
改动重点: - Expand the README diagnostics section with the 2.0 positioning, standalone build flow, legacy TUI compatibility, and a command map. - Document stateful and stateless workflows for test@127.0.0.1 without exposing the cookie on the command line. - Clarify output formats, OTP compatibility, deadlines, context behavior, and links to detailed validation evidence. 验证: - Ran the generated observer_cli --help and checked the documented command names and options against its output. - Ran git diff --check and git diff --cached --check successfully. - Did not run EUnit because this commit changes documentation only.
Wrap network `stat_fun` calls in `network_resource/2` with `try/catch` so transient port failures (for example, a port disappearing during stat collection) are treated as `disappeared` instead of crashing collection. Add an inet test that simulates `badarg` from `stat_fun` and verifies the result increments `disappeared_count` and returns no items.
…sing Summary: - Extend processes duration mode to all supported sorts (memory, message_queue_len, reductions, binary_memory, total_heap_size) with unified window outputs - Remove reduction-only restriction for process duration and update CLI usage/help with new examples - Add tolerant inet stat parsing so malformed network counter shapes degrade to disappeared instead of crashing - Add regression tests covering all process duration sorts and network stat-shape robustness; align diagnostics parity notes with new semantics Verification: - rebar3 fmt - rebar3 as test eunit --module=observer_cli_cli_test --module=observer_cli_snapshot_test --module=observer_cli_inet_test - rebar3 eunit
Changes: - Extend process detail collection keys with priority, binary refs counters, catchlevel, suspending, error_handler, trap_exit, links/monitors/monitored_by, and current_stacktrace. - Keep behavior for process target resolution and TopN windows unchanged while adding missing-field normalization and JSON-safe sanitization. - Add coverage in snapshot and process tests to assert schema-safe output and guard against forbidden tuple leakage in links/monitors/stack fields. - Update CLI/TUI parity documentation to mark newly covered fields and remove them from pending lists. Validation: - rebar3 fmt - rebar3 as test eunit --module=observer_cli_snapshot_test - rebar3 as test eunit --module=observer_cli_process_test - rebar3 eunit - rebar3 as ci compile
改动重点: - Correct GC tuning collection and binary reference counting to match OTP and TUI semantics. - Redact process identifiers across signals, suspension data, error handlers, and stack frames without exposing raw terms or source paths. - Bound signal and stack detail lists while preserving total counts and truncation status, and align parity documentation with the resulting behavior. 验证: - Ran rebar3 fmt. - Ran rebar3 as test eunit --module=observer_cli_snapshot_test,observer_cli_process_test: 105 tests, 0 failures. - Ran rebar3 eunit: 577 tests, 0 failures. - Ran rebar3 as ci compile. - Ran git diff --check and live OTP 29 redaction/controller validation.
改动重点: - Extend ports inventory with controls and slot aliases plus parallelism and locking fields - Add bounded port TARGET inspection for signals, inet endpoints, statistics, allowlisted options, and report-scoped redaction - Update CLI parsing, response validation, focused EUnit coverage, and Ports parity documentation - Keep raw Port parsing target-local and reject invalid, stale, report-scoped, or arbitrary Erlang terms as not_found 验证: - rebar3 fmt - rebar3 as test eunit --module=observer_cli_cli_test,observer_cli_snapshot_test,observer_cli_escriptize_test,observer_cli_port_test (184 tests, 0 failures) - rebar3 eunit (580 tests, 0 failures) - rebar3 as ci compile - git diff --check - OTP 29 live proof with external and gen_tcp ports through generated CLI, redaction checks, and -noshell TUI detail comparison
改动重点: - Replace the pre-release gen-server-state command with otp-state for gen_server, gen_statem, and gen_event. - Enforce bounded, value-free state shapes, strict response validation, redaction, fixed acquisition deadlines, and behavior-specific output limits. - Limit supervision admission to 300 children and output to 100 while retaining scan refusals across application observations. - Update CLI reference, safety guidance, smoke coverage, and real OTP boundary fixtures. 验证: - Ran rebar3 eunit: 654 tests, 0 failures. - Ran rebar3 check, rebar3 as ci compile, rebar3 fmt --check, and git diff --check. - Ran scripts/escript-smoke.sh and a built-binary gen_event probe against a real distributed target. - Ran focused OTP 26-28 validation and manual 100/101/300/301 supervision benchmarks.
Greatly extends `docs/reference/tui.md` with detailed field-by-field documentation for Home, Network, Ports, Sockets, System, ETS, Mnesia, App, and Process detail views. It clarifies units, sampling behavior (current/total/delta/window), data sources, and renderer caveats so users can interpret TUI values consistently.
改动重点: - Replace the seven-field envelope with the fixed six-field response shared by every command producer. - Centralize outcome validation and exit-code derivation while keeping probe failures out of issues and skipped checks. - Simplify text rendering and retain command-domain data, safety controls, and output stream behavior. 验证: - Ran rebar3 fmt and the focused CLI, snapshot, diagnostic, and escriptize EUnit suites. - Ran rebar3 eunit with 659 tests and zero failures. - Ran rebar3 compile, rebar3 as ci compile, rebar3 xref, and scripts/escript-smoke.sh.
改动重点: - Add a strict JSON Schema 2020-12 definition for the six-field envelope and supported command families. - Package the schema in Hex and escript artifacts without adding a runtime schema dependency. - Add parity tests for required keys, enums, strict objects, command families, and Erlang validator coverage. 验证: - Parsed the schema with the OTP JSON implementation and ran observer_cli_schema_test. - Ran rebar3 escriptize and confirmed the schema is present in the escript archive. - Ran rebar3 hex build and confirmed the schema is present in the package contents.
改动重点: - Record the fixed six-field envelope, published schema, and probe failure source of truth. - Document the release-candidate same-build requirement while protocol version remains 1. 验证: - Reviewed the staged changelog diff against the implemented contract and packaging behavior. - Ran git diff --cached --check.
Consolidates the docs into a smaller, task-oriented structure: rewrites the README, turns the CLI reference into an end-to-end workflow guide, adds new Core concepts and TUI plugins pages, and updates TUI/changelog links. It removes the older tutorials/how-to/reference/explanation pages and updates docs.exs navigation groups to focus on CLI, TUI, plugins, and core concepts.
Update ExDoc extras to include the project changelog and license, grouped under a new Project section. Rewrite the 2.0.0 release-candidate changelog entry into a shorter, higher-level summary. Refresh the TUI navigation diagram and explanatory text to clearly distinguish global page shortcuts from row-level drill-down flows.
Refreshes README and docs for 2.0 with corrected `v2.0.0` schema/source links, clearer CLI/TUI behavior notes, updated plugin API/state semantics, and expanded reference details (probe reporting, inputs, navigation, and edge cases). Adds new changelog notes and embedded Mermaid flows/TODO screenshot placeholders. Also introduces `scripts/docs-screenshots.sh`, which compiles a local fixture and launches guided TUI/plugin sessions to capture consistent documentation screenshots.
Embed captured TUI screenshots across README and reference docs, replacing prior TODO placeholders for Home, Sockets, Process Info, and Runtime plugin views. Also configure ExDoc asset copying in docs.exs so images are published under assets/ in generated documentation.
Refines trace behavior across CLI, snapshot, and trace internals: `trace call` now requires timeout >= duration+7s, `trace stop --all` enforces a 5s minimum and explicit acknowledgement, and cleanup confirmation is reported accurately when worker timeout/death races occur. Trace captures now include selector metadata (`tracee`/`mfa`), preserve collected events on forced exits, detect/filter interference, and enforce a stricter response schema (including stop responses omitting historical events). Help/reference docs and tests were expanded to match the new safety and cleanup contract.
改动重点: - Add the logs command for bounded retained text from supported logger_std_h configured paths, with source and file-identity limits, schema validation, escaped output, and operator documentation. - Harden trace cleanup for process and port tracers, fixed recon name collisions, lifecycle races, response caps, and rate and completion semantics. - Tighten shared response validation and terminal-control escaping while expanding EUnit and escript smoke coverage. 验证: - REBAR_BASE_DIR=_build_commit_final rebar3 eunit (736 tests, 0 failures). - REBAR_BASE_DIR=_build_commit_final_fmt rebar3 fmt --check. - REBAR_BASE_DIR=_build_commit_final_ci rebar3 as ci compile. - REBAR_BASE_DIR=_build_commit_final_smoke scripts/escript-smoke.sh. - git diff --cached --check.
Delete `docs/observer-cli-log-access-design.md`, removing the large v3 proposal for `observer_cli logs` from the docs tree.
Refactor `observer_cli_escriptize` trace validation to use direct boolean expressions instead of explicit `=:= true/false` comparisons. This updates cleanup confirmation handling and natural trace shape checks (`Reloaded`/`Interference`) while keeping the same expected boolean outcomes with clearer logic.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c45a9cd4e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| cleanup_result(trace, Reason) -> | ||
| case observer_cli_trace:wait_cleanup(?TRACE_CLEANUP_TIMEOUT_MS) of | ||
| true -> error_result(Reason); |
There was a problem hiding this comment.
Don't confirm trace cleanup without verification
When a trace command times out or the worker is killed, this branch returns error_result(Reason) with cleanup_confirmed=true once wait_cleanup/1 only sees the owner and recon helper names disappear. That helper does not verify the traced PID's call flag or MFA trace pattern (the normal path uses verify_cleanup/1 for that), so a failed clear_trace/0 can still be reported as confirmed cleanup and the caller won't retry trace stop --all while target-wide tracing may remain enabled.
Useful? React with 👍 / 👎.
| {modules, [observer_cli]}, | ||
| {registered, []}, | ||
| {applications, [kernel, stdlib, recon]}, | ||
| {applications, [kernel, stdlib, crypto, recon]}, |
There was a problem hiding this comment.
Exclude controller-only crypto from remote-loaded deps
Adding crypto here makes the TUI auto-loader treat it as an observer_cli runtime dependency: do_remote_load/1 calls required_modules(Apps), which walks application:get_key(observer_cli, applications) and then remote_load_module/2 for every module in those apps. When a target does not already have observer_cli loaded, this now attempts to copy the controller's OTP crypto modules onto the target before loading observer_cli, which can fail or load incompatible OTP code when controller and target OTP/crypto versions differ; crypto is only used for controller-side cookie generation, so it should be excluded from the remote-loaded dependency closure.
Useful? React with 👍 / 👎.
| Audit = audit_inventory(Acc, length(Items), ProcessStarted, ProcessFinished), | ||
| Data = Audit#{ | ||
| items => Items, | ||
| eligible_count => length(Items0), |
There was a problem hiding this comment.
Keep application eligibility separate from process scans
For applications, Audit still carries process-scan fields such as scanned_count, but this line replaces eligible_count with the number of loaded applications plus no_group. On targets with many loaded libraries and relatively few processes, eligible_count can exceed scanned_count, violating the controller's valid_complete_resource_wrapper/1 invariant and causing an otherwise valid observer_cli applications response to be rejected as invalid_command_response.
Useful? React with 👍 / 👎.
Simplify `with_forced_payload/3` to only handle forced outcomes, removing the pass-through fallback. In `clear_trace/0`, preserve `recon_trace:clear()` return values instead of collapsing non-`ok` results into `cleanup_unconfirmed`, while still treating exceptions as cleanup-unconfirmed errors.
改动重点: - Replace five relative screenshot paths with immutable raw GitHub URLs. - Keep the links valid in GitHub and Hex source views without changing ExDoc asset generation. 验证: - Ran `rebar3 docs` successfully. - Verified all five generated HTML image URLs, pinned commit asset blobs, and `git diff --cached --check`.
Tighten the 2.0 release/CI setup by documenting supported OTP versions, adding release instructions, checking formatting in CI, and covering Mix compilation alongside the existing rebar3 jobs. On the runtime side, make TUI startup and remote loading safer: reject cross-OTP auto-loads with a clear error, only upload root app modules, include recon explicitly, handle stdin EOF and malformed PID input cleanly, pair scheduler wall-time cleanup correctly, clear stale redraw output, and refine snapshot/diagnostic lifecycle counts with bounded PID samples and updated tests.
改动重点: - Move the cross-OTP runtime out of setup-beam's shared install directory before installing the controller OTP. - Re-run OTP's Install script at the new prefix so both runtimes keep clean, valid library trees. 验证: - Parsed the staged workflow as YAML and ran git diff --cached --check. - Ran rebar3 fmt --check, rebar3 as ci compile, and rebar3 eunit (735 tests, 0 failures). - Did not run the Ubuntu multi-OTP matrix locally; GitHub Actions must verify the cross-runtime jobs.
Restrict CI release handling to version tags, build and upload OTP-specific escript artifacts, and publish a GitHub Release with checksums. Add a versioned install script plus README, CLI docs, and releasing guide updates to describe the new escript-based release flow.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #136 +/- ##
===========================================
+ Coverage 95.20% 98.04% +2.83%
===========================================
Files 20 25 +5
Lines 2629 8029 +5400
===========================================
+ Hits 2503 7872 +5369
- Misses 126 157 +31 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Key changes: - Add behavior-backed CLI, distributed-node, schema, log, snapshot, socket, trace, and TUI failure-path coverage. - Enforce a 98 percent Codecov project target with zero tolerance for regression. - Keep production behavior unchanged by limiting the diff to tests and coverage policy. Validation: - epmd -daemon && rebar3 as test do eunit, covertool generate (770 tests, 0 failures; 7763/7912 lines, 98.1168 percent). - rebar3 compile - rebar3 as ci compile - rebar3 fmt --check - YAML coverage-gate validation and git diff --check
Key changes: - Exclude proc_lib:get_label/1 and proc_lib:set_label/1 from ExDoc auto-link resolution. - Preserve the inline code text while avoiding OTP 26 undefined-reference warnings. Validation: - OTP 26.2.5.2 isolated rebar3 as ci check - rebar3 as ci check on OTP 29.0.3 - rebar3 fmt --check - git diff --check
Update `logs` CLI/help docs to state it performs a single read (no follow), and clarify `--timeout` as a 10s default remote-operation deadline (max 120s). Tests were adjusted to be more environment-safe by tolerating `json_unavailable`, setting/restoring both `HOME` and `XDG_CONFIG_HOME` for context-path scenarios, and gating the socket capability-absence test to OTP 27+.
Adds stronger CI/release checks by smoke-testing the installer on Ubuntu (without `shasum`) and running a Mix release smoke path that verifies `:crypto` is included. The installer now accepts either `sha256sum` or `shasum`, and `mix.exs` declares `:crypto` in `extra_applications`. Fixes multiple runtime/data correctness issues across views: process heap/GC values are consistently converted to bytes, process detail rendering is bounded to prevent oversized/slow output, inet window sampling now uses consistent directional deltas and correct input/output column placement, ETS churn handles unread memory values safely, and Mnesia memory handling now treats `disc_only_copies` correctly while skipping disappeared tables. Docs and tests were updated to match the new behavior.
Configure `mix escript.build` as a first-class build path (with matching escript metadata in `mix.exs`), add CI/release smoke coverage for the Mix-generated binary, and update install/reference docs accordingly. Tighten bounded process-detail handling by normalizing oversized message output to `too_large`, distinguishing true detail errors from size/time/heap limits, and enforcing worker kill timers; add a dedicated limits test suite for large terms, formatter hangs, parent death, and heap-limit behavior.
Updates process detail limiting to measure the final rendered payload (including view prefixes) against byte/character caps, with clearer handling for state errors versus formatter/output overflows. It also switches the default/sample formatter to `~p` printing, hardens output validation (binary size, unicode length, invalid formatter returns, formatter crashes), and expands limits tests to cover binary visibility, huge integers, unicode-heavy output, invalid formatter output, and fallback behavior.
Strengthens process detail safety limits by switching depth validation from `io_lib:limit_term/2` to explicit structural depth traversal, and updates tests to cover deep nested terms and large binaries that must return `too_large`. It also applies a `64*1024 + 1` formatter `chars_limit` tripwire (with docs) so soft formatter truncation is rejected by the existing hard output cap, preserves formatter-rendered state output without rewriting the first line, and factors mnesia table memory sizing into a small helper for clearer storage-specific handling.
Remove the special-case clause that immediately returned `too_large` for oversized binaries. All output now flows through the same `unicode:characters_to_binary/1` path and shared size check, keeping detail output validation and conversion behavior consistent.
No description provided.