Repository navigation
This release changes the stored record format so that later releases can add to it
without breaking earlier ones. It reads ledgers written by 0.8 and records into them.
1.0 is meant to keep this format, so please report a ledger that this release reads,
records into, or upgrades wrongly at https://github.com/Protention/ocura-oss/issues.
Upgrading from 0.8
Installing this release leaves an existing project's records as they are. A ledger
written by 0.8 stays usable from 0.8: this release records into it in schema 3 until
you upgrade it. Upgrade a project only once every environment that uses it has this
release, because 0.8.0 cannot read an upgraded ledger.
- Keep a ledger written by 0.8 in schema 3 by default. New records are written in
schema 3 beside the older ones, so 0.8 still reads, verifies, and records into the
ledger, and a manifest retained under 0.8 still verifies.run,branch,
recover, andverifyprint a note that says how to upgrade;
ocura-oss settings upgrade=offstops it. - Add an opt-in upgrade.
ocura-oss settings upgrade=overwritefor one project, or
OCURA_OSS_UPGRADE=overwritefor every project, converts the ledger to schema 4 in
place on the nextrun,branch, orrecover. IDs and log files do not change.
Manifests retained before the upgrade no longer match; save a new one afterwards. - Write new ledgers in schema version 4 and read schemas 3 and 4. A schema 4 run record
names its captured output in onestreamsobject. Command output and the Python
API are unchanged:show --jsonandRunRecordkeepstdout_logand the related
fields.
New commands and settings
- Add
ocura-oss mcp, a Model Context Protocol server over stdio. An agent client
reads the ledger through the toolsruns,show,logs,compare,verify, and
attempts, and keeps a run's note and tags withnoteandtag. It cannot record
a run or change a run's record; recording still goes throughrun. It adds no
dependency. - Add
logs --tail Nandlogs --search TEXT, which print the last lines of a log
or its numbered lines containing the text. - Add the
settingscommand and.ocura-oss/settings.json. Each setting also has an
environment variable, which a project follows until it stores its own value. - Add the
compresssetting.ocura-oss settings compress=on, or
OCURA_OSS_COMPRESS=onfor every project, compresses each run's large logs as
run --compressdoes.run --no-compressandrun(compress=False)keep one
run's logs raw. In Python,run(compress=...)now defaults toNone, which
follows the setting. - Add
ocura-oss noteandocura-oss tag, which keep editable text and tags beside
a finished run, andruns --tag TAG, which lists the runs carrying a tag.show
returns the note, andrunsreturns each run'stags. A note can be changed and
is not listed in a manifest, so it never alters a run's record or a retained
manifest's result. 0.8 ignores thenotes/directory. - Add
noticesto JSON results when a command prints anote:line.
Changed behaviour
- Show a command's output, and write it to its log, as the command writes it.
run
used to hold output back until 64 KiB had arrived or the command had exited. - Keep an index of finished runs, so
runsandshowopen only the records they
return..ocura-oss/index.sqliteis a cache built from the
records:verifyignores it, deleting it loses nothing, and
ocura-oss settings index=offorOCURA_OSS_INDEX=offturns it off. It uses the
sqlite3module that ships with Python, so there is still no dependency. - Report a record that needs a later version as
newer recordinverify, with
integrity still ok, where 0.8 reported it as damage.runsleaves such a run out
and counts it innewer_runs; runs branched from it are read as usual. A record may
list what a reader needs in arequiresarray.verifychecks a stream a later
version adds understreamsas it checks stdout. - Report a log stored in an encoding this version does not read the same way,
where 0.8 reported a missing log and an orphaned file.