Add the session view to the trace page. Read the specimens first, then build the lane strip, the tree, the document, and the inspector from one authored run. The family's plugins must be visible on the records they touch, and the page must read the same run with the family off.
hook / Classic
hook-dsh-workspace-merge
Merges a batch atomically, file by file
Facts
- Package
- @playform/hook-dsh-workspace-merge
- Version
- 0.2.1
- Kind
- hook
- Release
- Classic
- Licence
- CC0-1.0
- Directory
- Classic/packages/hook-dsh-workspace-merge
What it does
Merges a batch atomically, file by file.
Conversation
The turn as a document: the calls every plugin page shares, what this package changes in them, and the order its work happens in.
Conversational
Lane
The same run as time: one row per resource, a bar per span, and the clock every record shares. A wait is drawn as an outline, because nothing is busy.
Session
The tree, the document, and the inspector read one record list. The switch at the top of the document changes the face they read, and the run changes with it.
The turn
The same 3 calls on every plugin page, so a reader who moves between plugins stays in the same frame.
| Seq | Call | Outcome |
|---|---|---|
20 | bash ls -la | ok |
21 | write src/index.ts | ok |
22 | read src/index.ts | ok |
Change
The one line that differs with this package installed, transcribed from its source by the dissection.
- Model the file holds its previous bytes
- Transcript path: "/repo/src/a.ts", status: "applied", version: "v2"
56 character changed, from 33 to 56.
- Property
- A merge of concurrent writes
- Knob
- strategy, documented per domain
- Seam
- fs/observed
Flow
The order this package's work happens in, with the branch that decides it inline, transcribed from the source; the rule it obeys is the last band of Architecture.
- 01workspace_merge: the batch arrives with its operations and their version fences
why
The merge is called rather than observed, so it registers no event listener.
- 02branch The policy block's commit verdict is approve
why
The outer gate, in front of the atomic gates and every write.
- 03fail merge held (<n> files): zero writes, and every operation replied rejected
why
Nothing is persisted, so the batch never starts.
- 04The atomic gates: an empty batch, maxFiles, maxTotalBytes, a duplicate path, a missing fence, an unresolved path, a stale fence
why
The gates run before any write, so a refusal costs nothing.
- 05fail batch <id> rejected (<reason>): the whole batch is refused
why
All-or-nothing is the default, so a gate conflict is the batch's and not the file's.
- 06Commit one file at a time through the factory's Write, with replaceIfVersion and the sandbox fence
why
The sequential fold is what keeps the version-guarded writes from racing.
- 07Verify every applied write by reading the file back
why
An applied reply is a verified reply, not an assumed one.
- 08branch A mid-batch write fails, in all-or-nothing mode
why
Survivors mode is the alternative, and it reports what survived instead.
- 09fail The remaining files are replied recovery-required
why
The journal domain completes or compensates, and the state is never invisible.
- 10pass The reply union per file: applied, conflict, denied, rejected, recovery-required, outcome-unknown
why
Derived from the edit lifecycle rather than guessed.
- 11store workspace_merge: one record per batch
why
The journal the recovery domain reads later.
Harness
The laws the package states, the line it writes when it loads, the seam the harness dispatches with none of the family, and the surface and knobs a run can set.
Default
What the harness does at this package's seam with none of the family installed, so the surface below has something to be a difference from.
The harness dispatches fs/observed as a emit and already has listeners there: fs-observation-policy, skill-filesystem, workspace-files.
An emit listener observes a fact that already happened, so the harness's own listeners can record it and cannot change it. This package records beside them, or acts on the world rather than on the payload.
Surface
Every listener, tool, service, and knob the README documents.
| Kind | Name | What |
|---|---|---|
| service | workspaceMerge | (preview, commit, batch, batches, statistics). |
| tool | workspace_merge | One tool from apply: workspace_merge, which lives inside its owning hook. |
| config | workspace_merge | own KV domain (workspace_merge, config domain), the journal the recovery domain reads. |
| listener | event listener, | No event listener, because the merge is called and not observed. |
Install
The package as the profile adds it.
pnpm add @playform/hook-dsh-workspace-mergeConfiguration
Every knob this plugin documents, with its default.
| Field | Type | Default | Meaning |
|---|---|---|---|
| enabled | false | the master switch (the IDLE-forever posture) | |
| log | true | the ledger switch (the shared cell) | |
| logFile | ~/.dsh/playform/hook-dsh-workspace-merge.log | the ledger | |
| domain | workspace_merge | the KV domain name | |
| mode | all-or-nothing | the atomicity semantics (survivors is the alternative) | |
| maxFiles | 50 | the per-batch file gate | |
| maxTotalBytes | 1000000 | the per-batch byte gate | |
| policy.* | D6 defaults | the per-action allowlist (the outer gate; see above) |
Family
The neighbours at the same seam, the arms beyond it, the twin in the other release tree, and the packages this one needs.
Neighbours
The behavior map lists 9 answers at fs/observed, in the order the family registers them.
| Answer | Effect | Position |
|---|---|---|
| hook-dsh-cargo-governor | rewrite | neighbour |
| hook-dsh-package-governor | rewrite | neighbour |
| hook-dsh-package-pinner | rewrite | neighbour |
| hook-dsh-workspace-approve | record | neighbour |
| hook-dsh-workspace-audit | record | neighbour |
| hook-dsh-workspace-journal | record | neighbour |
| hook-dsh-workspace-merge | rewrite | this package |
| hook-dsh-workspace-monitor | record | neighbour |
| hook-dsh-workspace-observe | record | neighbour |
Arms
The seams its source also registers, beyond the one its README documents.
Its source registers no seam beyond the one its README documents.
Twin
The same package in the other release tree, when one exists.
Its twin is ets-hook-dsh-workspace-merge.
It registers the same listeners in the same order and composes the same ledger strings; the ledger file's name, which carries the package identity, and the factory base import are the only differences.
Dependencies
The packages this one imports, and whether each one is the family's own.
| Package | Role |
|---|---|
| family | |
| family |
Person
What the person waits for, reads, and never sees.
The person sees the text after the rewrite and not what it replaced, so the change stays invisible unless the source is read beside the result.
The source records no verdict table for this package, so no gate machine is drawn; the branch it takes is in the flow above.
Architecture
This plugin's own structure: the shape the portrait gives it, the facts its source documents, and the rule its flow obeys.
Shape
Plugs into the workspaceMerge service and the workspace_merge tool.
The batch commit: atomic gates, fenced writes, and a reply per file.
- Holds the whole batch when the policy block's commit verdict is approve
- Runs the atomic gates before any write, and refuses the batch rather than a file
- Commits one file at a time through the factory's Write, then reads each file back
- Reports applied, conflict, denied, rejected, recovery-required, or outcome-unknown
Its shape machine belongs to Person.
Record
The release line, the source, and the files this page was read from.
Release
The versions the package's own changelog records, newest first.
- 0.3.0
- 0.2.1
Source
The package as the repository holds it.
Origin
The files this page was built from, and what each one supplies.
The files this page was read from 5
| File | Contributed | State |
|---|---|---|
| package.json | The name, the version, the private flag, and the dependencies. | read |
| README.md | The summary, the surface table, and the configuration table. | read |
| CHANGELOG.md | The release lines and their versions. | read |
| cordis.patch.yml | Activation: the bundle entry that mounts the plugin. | read |
| Source/Function/Apply.ts | The listeners, their registration order, and the service the flow calls. | read |
- Data
- The monorepo, read during the build
- Connection
- Build-time read; nothing is fetched at runtime
- Capture
- package.json, README.md, CHANGELOG.md, Source/Function/Apply.ts
Expand provenance source
This page is static. It cannot invoke the plugin, read a ledger, or change a configuration. Every figure comes from those files; a missing README falls back to the manifest's own description, and a package with no surface table shows no surface section.