Advanced Octave A55 — Inspecting and summarizing a Session

by Giux GX-TXT, octave-en, scripts-en 2 min read

Advanced GNU Octave with GX-TXT · Module 10

Before using a resource it is useful to verify that it is present in the current session and to know its identity. The Inspection API provides this information without directly reading the internal logs.

Objectives and prerequisites

We repeat the execution context seen in A06 and the Dataset octave_advanced_sensor created in A07. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import riepilogo.m, register it and run it in the Runner.

Summary and Identity

SESSION_INSPECTION_API_v1/summary returns information about the current session; dataset_ids and selection_ids list identifiers. The script searches for the Synthetic Dataset ID and, if present, consults dataset for identity and origin and dataset_location for its availability.

The session is called corso_octave_avanzato and at the time of execution contains 24 Datasets and no Selections. The chosen Dataset is a CSV table with 11 lines, produced by the course script. The numbers and content depend on the Session: the absence of Selection does not imply that something has gone wrong.

dataset_location returns a controlled availability record, but does not recalculate the content’s hash: its integrity state indicates that this verification has not been performed. Do not confuse this information with a complete verification of the payload.

Identifiers and routes

The logical ID serves to ask the framework for the correct resource in the current Session; it should not be treated as a filesystem path. gxtxt_context(), introduced in A06, describes the context of the script, while the Inspection API consults the recorded resources. If a requested ID is missing, the script communicates it instead of assuming it exists.

Exercise

  1. What does dataset_ids return?
  2. Does the presence of the availability record prove that the content was verified through hash?
  3. Why can the displayed Dataset number change?

Worked solution

  1. Dataset identifiers in the current session.
  2. No: dataset_location does not recalculate the payload hash.
  3. It depends on the resources created or removed at the Session and the time of consultation.

Download the Module 10 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *