Skip to main content

Runtime adapter toolkit for Runopsy: recorder, secret scanner and contract

Project description

runopsy-adapter

What a runtime adapter is built from: a recorder that owns trace identity, a secret scanner that runs at capture time, a contract any adapter must satisfy, and a working shell adapter that records real command runs.

Why the recorder owns identity

An adapter's job is to know its runtime, not the trace format. Left to hand-roll ids and sequence numbers, every adapter reinvents the same three bugs — duplicate ids, gaps, events attributed to the wrong run — and the integrity checker then reports them as corruption in the user's trace rather than as a defect in the adapter. RunRecorder allocates sequence numbers and ids so a trace is contiguous by construction.

Why scanning happens at capture

contains_secret originates here and nowhere else. A credential that reaches the journal is already on disk, and every later control is then trying to unring a bell. Arguments and output are scanned and hashed at the moment they are recorded; the text itself never enters the trace.

Detection is best effort by construction. It is one layer among several, never the reason it is safe to write something down.

The contract

assert_adapter_contract is shipped rather than kept in this repository's tests, because the adapters that matter will live elsewhere and track their own runtime versions. Each rule exists because breaking it yields a confident wrong answer instead of an obvious error:

  • exactly one run_start, and it comes first
  • at most one run_end, and nothing recorded after it
  • unique event ids — ingest deduplicates on them, so a collision silently drops a step
  • contiguous ascending sequence numbers — a diagnosis over a gap misplaces the onset
  • every event belongs to the run being recorded
  • every timestamp timezone-aware — otherwise traces from two machines interleave wrongly

The shell adapter

record_steps runs real commands and records them. It is not an agent runtime, but it emits the same events one would, so the engine gets data nobody staged. Execution continues past a failure on purpose: an agent carries on after a step goes wrong, and the distance between the step that broke and the step where it became visible is precisely what Runopsy exists to close. Stopping at the first error would only ever produce traces whose onset is also the symptom.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runopsy_adapter-0.1.5.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runopsy_adapter-0.1.5-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file runopsy_adapter-0.1.5.tar.gz.

File metadata

  • Download URL: runopsy_adapter-0.1.5.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for runopsy_adapter-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1275eaa7744d39e902081ff38ac0b5cd216589c248889f2177e9e2fdd2177ed3
MD5 fb8a2c697a2e5448d2ebcd50f26cbe3d
BLAKE2b-256 79683757174d795539fb6bae3efa1862092b829a2ee70399828540548aa9d584

See more details on using hashes here.

File details

Details for the file runopsy_adapter-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: runopsy_adapter-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for runopsy_adapter-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e813d111a6b10448b28ec53aebd6ec909a6e5b3f17072b21066448d338bba7f0
MD5 719c1f3da4bfa61672606da9f3165d98
BLAKE2b-256 e11006f59ac711d0b2861c90d9bda20d590f1f437d08a34247b071a41fdc0cca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page