Skip to content

feat(knop): implement first local add-reference slice#3

Merged
djradon merged 4 commits intomainfrom
08-alice-bio-referenced
Apr 5, 2026
Merged

feat(knop): implement first local add-reference slice#3
djradon merged 4 commits intomainfrom
08-alice-bio-referenced

Conversation

@djradon
Copy link
Copy Markdown
Contributor

@djradon djradon commented Apr 4, 2026

  • add core planning and local runtime execution for knop.addReference
  • wire weave knop add-reference into the CLI with explicit target designator and referenceRole
  • add unit, integration, and black-box CLI tests for the settled 07-alice-bio-integrated-woven -> 08-alice-bio-referenced fixture
  • add [[wd.spec.2026-04-04-knop-add-reference-behavior]] for the first carried reference-catalog behavior
  • rename the task note to completed and update wd.todo, wd.decision-log, wd.codebase-overview, and related conversation links

@CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added a user-facing weave CLI command to add a reference link between KNOPs; requires an explicit reference role, creates a ReferenceCatalog and a stable ReferenceLink, and updates KNOP inventory.
  • Documentation

    • Updated overview, decision log, spec notes, tasks, and guidance to describe behavior, acceptance criteria, and planned slices for the new flow.
  • Tests

    • Added unit, integration, and end-to-end tests exercising CLI and local execution, validation paths, and success/failure scenarios.

djradon added 2 commits April 4, 2026 15:50
- add core planning and local runtime execution for `knop.addReference`
- wire `weave knop add-reference` into the CLI with explicit target designator and `referenceRole`
- add unit, integration, and black-box CLI tests for the settled `07-alice-bio-integrated-woven` -> `08-alice-bio-referenced` fixture
- add `[[wd.spec.2026-04-04-knop-add-reference-behavior]]` for the first carried reference-catalog behavior
- rename the task note to completed and update `wd.todo`, `wd.decision-log`, `wd.codebase-overview`, and related conversation links
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ab607e1a-6dc5-42c2-ab6a-62c96d52c69d

📥 Commits

Reviewing files that changed from the base of the PR and between a1ef602 and 1f4113a.

⛔ Files ignored due to path filters (1)
  • documentation/notes/wd.conv.2026.2026-04-04_1537-08-weave-alice-bio-referenced-codex.md is excluded by !documentation/notes/wd.conv.*
📒 Files selected for processing (5)
  • documentation/notes/wd.task.2026.2026-04-04_1553-weave-alice-bio-referenced-woven.md
  • documentation/notes/wd.task.2026.2026-04-04_2019-update-alice-bio-payload.md
  • documentation/notes/wd.todo.md
  • src/runtime/knop/add_reference.ts
  • tests/integration/knop_add_reference_test.ts
✅ Files skipped from review due to trivial changes (1)
  • tests/integration/knop_add_reference_test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • documentation/notes/wd.todo.md
  • src/runtime/knop/add_reference.ts

📝 Walkthrough

Walkthrough

Adds a carried implementation slice for knop add-reference: CLI command, core planner producing Turtle/inventory mutations, a runtime executor that applies atomic filesystem changes, extended module exports, unit/integration/e2e tests, and supporting documentation, decision, and spec notes.

Changes

Cohort / File(s) Summary
Documentation
documentation/notes/wd.codebase-overview.md, documentation/notes/wd.decision-log.md, documentation/notes/wd.spec.2026-04-04-knop-add-reference-behavior.md, documentation/notes/wd.todo.md, documentation/notes/wd.general-guidance.md, documentation/notes/wd.task.2026.2026-04-04_1553-weave-alice-bio-referenced-woven.md, documentation/notes/wd.task.2026.2026-04-04_2019-update-alice-bio-payload.md, AGENTS.md
Added decision/spec/task notes, updated overview/todo/guidance and AGENTS to document the new carried knop add-reference slice, CLI contract, behavior constraints, and next tasks.
CLI Command
src/cli/run.ts
Added weave knop add-reference <designatorPath> with required options, input normalization helpers (resolveRequiredOptionValue/resolveRequiredArgumentValue), audit logging, result printing, and extended CLI error unwrapping for add-reference errors.
Core Planning
src/core/knop/add_reference.ts, src/core/knop/mod.ts
New planner exporting request/plan types, KnopAddReferenceInputError, and planKnopAddReference; validates inputs and roles, derives IRIs/paths, renders references.ttl, and updates knop inventory Turtle. Re-export added in mod.ts.
Runtime Executor
src/runtime/knop/add_reference.ts, src/runtime/knop/mod.ts
New runtime executeKnopAddReference with workspace validation, meta extraction, plan creation, precondition checks, atomic staged writes/backups, rollback on failure, operational/audit events, and describeKnopAddReferenceResult. Re-export added in mod.ts.
Core Unit Tests
src/core/knop/add_reference_test.ts
Tests for planner: IRI/path computation, Turtle content assertions, role normalization, unsafe-segment rejection, and pre-existing catalog detection.
Integration & E2E Tests
tests/integration/knop_add_reference_test.ts, tests/e2e/knop_add_reference_cli_test.ts
Integration tests for executeKnopAddReference (filesystem effects, error cases, logger-failure handling) and e2e CLI tests validating manifest-scoped transition behavior, file content comparisons, and audit/log outputs.

Sequence Diagram

sequenceDiagram
    participant CLI as CLI Handler
    participant Runtime as Runtime Executor
    participant Core as Core Planner
    participant FS as Filesystem
    participant Meta as Mesh Meta

    CLI->>Runtime: executeKnopAddReference(workspaceRoot, request)
    Runtime->>FS: validate workspace root & paths
    Runtime->>Meta: read _mesh/_meta/meta.ttl
    Meta-->>Runtime: meshBase
    Runtime->>FS: read source knop inventory.ttl
    FS-->>Runtime: currentKnopInventoryTurtle
    Runtime->>Core: planKnopAddReference(resolved request)
    Core->>Core: normalize inputs, derive IRIs & paths, render references.ttl and updated inventory.ttl
    Core-->>Runtime: KnopAddReferencePlan
    Runtime->>FS: verify target inventory exists & created files absent
    Runtime->>FS: write created files (temp → atomic rename)
    Runtime->>FS: stage backups and replace updated files
    FS-->>Runtime: write success
    Runtime-->>CLI: KnopAddReferenceResult (created/updated paths, IRIs)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐇 I hopped through meta and stitched a small link,

I mapped every role and I baked every file,
A catalog born with a soft, tidy blink,
I hopped back to my burrow and munched on a smile,
References now bloom — carrots for style.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(knop): implement first local add-reference slice' clearly and concisely describes the primary change: implementing the knop add-reference feature. It aligns with the main focus of the PR across core planning, runtime execution, CLI integration, and comprehensive test coverage.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 08-alice-bio-referenced

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

❌ Patch coverage is 74.24426% with 213 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/runtime/knop/add_reference.ts 70.02% 126 Missing and 23 partials ⚠️
src/core/knop/add_reference.ts 76.00% 43 Missing and 17 partials ⚠️
src/cli/run.ts 95.00% 0 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/cli/run.ts`:
- Around line 198-227: Trim and validate the positional designatorPath inside
the .action handler before using it: call designatorPath =
String(designatorPath).trim() (or equivalent) after it is received, then check
it is non-empty and if invalid throw/return a clear error (same pattern as
resolveRequiredOptionValue) so execution (including executeKnopAddReference and
auditLogger.command) never proceeds with a whitespace-only value; update any
error message to mention the positional designatorPath.

In `@src/core/knop/add_reference.ts`:
- Around line 50-68: normalizeDesignatorPath currently allows segments like
"alice:bio" that can produce non-mesh-relative IRIs; update
normalizeDesignatorPath to validate each segment against a safe segment charset
(only allow a-z, A-Z, 0-9, hyphen, underscore, dot — reject colons, slashes,
spaces, etc.), and throw a clear validation error when a segment fails. In
add_reference.ts (places constructing designatorPath and
referenceTargetDesignatorPath and where toKnopPath is used) call the tightened
normalizeDesignatorPath and ensure any invalid input causes fast failure rather
than producing IRIs; mirror the identical charset check in the runtime validator
code paths mentioned (the blocks around lines 117-153 and 168-185) so both
compile-time and runtime enforce the same rule. Ensure error messages reference
the offending segment and the function names normalizeDesignatorPath and
toKnopPath for easy debugging.
- Around line 155-165: The normalizeReferenceRole function currently uses the
"in" operator against referenceRoleIriByToken which matches prototype properties
(e.g., "constructor"); change the validation to check only own properties by
using Object.prototype.hasOwnProperty.call(referenceRoleIriByToken, normalized)
instead of "normalized in referenceRoleIriByToken", keep throwing
KnopAddReferenceInputError for empty/unsupported values and return the
normalized value as ReferenceRoleToken as before.

In `@src/runtime/knop/add_reference.ts`:
- Around line 102-108: The workspace mutation is not atomic because
writeCreatedFiles and writeUpdatedFiles commit changes before all work (and
success logging) completes; modify the add-reference flow so mutations are done
atomically: for created files use a staging-and-rename strategy (write to temp
paths then atomically rename into final paths) or implement a rollback path that
removes any newly created files if a later step fails, and ensure
writeUpdatedFiles applies updates transactionally (e.g., write to temp files and
replace). Keep the pre-checks (assertReferenceTargetExists,
assertCreateTargetsDoNotExist) as-is but perform the staged commit immediately
after those checks and before any post-commit logging; make the success log
calls best-effort (catch/log but don’t throw) so logging failures do not leave
the workspace mutated without allowing retries. Ensure the new behavior is
applied to both the block around writeCreatedFiles/writeUpdatedFiles and the
other occurrence noted (lines ~159-188) so all workspace mutations are atomic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9546b48c-2afa-467f-87ee-0df46aac2a4f

📥 Commits

Reviewing files that changed from the base of the PR and between 180a81b and 137b8d6.

⛔ Files ignored due to path filters (3)
  • documentation/notes/wd.completed.2026.2026-04-04-alice-bio-referenced.md is excluded by !documentation/notes/wd.completed.*
  • documentation/notes/wd.conv.2026.2026-04-04_1524-weave-alice-bio-integrated-woven-codex.md is excluded by !documentation/notes/wd.conv.*
  • documentation/notes/wd.conv.2026.2026-04-04_1537-08-weave-alice-bio-referenced-codex.md is excluded by !documentation/notes/wd.conv.*
📒 Files selected for processing (12)
  • documentation/notes/wd.codebase-overview.md
  • documentation/notes/wd.decision-log.md
  • documentation/notes/wd.spec.2026-04-04-knop-add-reference-behavior.md
  • documentation/notes/wd.todo.md
  • src/cli/run.ts
  • src/core/knop/add_reference.ts
  • src/core/knop/add_reference_test.ts
  • src/core/knop/mod.ts
  • src/runtime/knop/add_reference.ts
  • src/runtime/knop/mod.ts
  • tests/e2e/knop_add_reference_cli_test.ts
  • tests/integration/knop_add_reference_test.ts
💤 Files with no reviewable changes (1)
  • documentation/notes/wd.todo.md

Comment on lines +50 to +68
const meshBase = normalizeMeshBase(request.meshBase);
const designatorPath = normalizeDesignatorPath(request.designatorPath);
const referenceTargetDesignatorPath = normalizeDesignatorPath(
request.referenceTargetDesignatorPath,
);
const referenceRoleToken = normalizeReferenceRole(request.referenceRole);
const referenceRoleIri = referenceRoleIriByToken[referenceRoleToken];
const knopPath = toKnopPath(designatorPath);
const referenceCatalogPath = `${knopPath}/_references`;
const referenceLinkPath = `${referenceCatalogPath}#reference001`;

return {
meshBase,
designatorPath,
referenceTargetDesignatorPath,
referenceCatalogIri: new URL(referenceCatalogPath, meshBase).href,
referenceLinkIri: new URL(referenceLinkPath, meshBase).href,
referenceRoleIri,
referenceTargetIri: new URL(referenceTargetDesignatorPath, meshBase).href,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Reject designator characters that stop being mesh-relative in RDF output.

normalizeDesignatorPath() still accepts values like alice:bio. Once those strings are turned into planned IRIs and raw Turtle <...> refs, the add-reference result can escape the mesh namespace or serialize invalid RDF instead of failing fast. Please lock this down to a safe segment charset here, and mirror the same rule in the runtime validator.

Also applies to: 117-153, 168-185

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/knop/add_reference.ts` around lines 50 - 68, normalizeDesignatorPath
currently allows segments like "alice:bio" that can produce non-mesh-relative
IRIs; update normalizeDesignatorPath to validate each segment against a safe
segment charset (only allow a-z, A-Z, 0-9, hyphen, underscore, dot — reject
colons, slashes, spaces, etc.), and throw a clear validation error when a
segment fails. In add_reference.ts (places constructing designatorPath and
referenceTargetDesignatorPath and where toKnopPath is used) call the tightened
normalizeDesignatorPath and ensure any invalid input causes fast failure rather
than producing IRIs; mirror the identical charset check in the runtime validator
code paths mentioned (the blocks around lines 117-153 and 168-185) so both
compile-time and runtime enforce the same rule. Ensure error messages reference
the offending segment and the function names normalizeDesignatorPath and
toKnopPath for easy debugging.

- validate and trim the positional `designatorPath` in the CLI
- reject unsafe designator path segments in core and runtime normalization
- use an own-property check for `referenceRole` token validation
- stage add-reference workspace mutations atomically with rollback on failure
- treat success logging as best-effort after commit
- add regression tests for invalid inputs and logging-failure behavior
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/runtime/knop/add_reference.ts (1)

501-504: ⚠️ Potential issue | 🟠 Major

The updated-file swap still isn't atomic.

Line 502 moves the live file aside before Line 503 publishes the replacement. If the process is interrupted between those awaits, or another reader hits the workspace mid-commit, the updated path disappears even though this flow is labeled atomic. Please switch updated-file commits to a replace-in-place step so the destination path never goes missing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/runtime/knop/add_reference.ts` around lines 501 - 504, The two-step swap
in the loop (Deno.rename(file.absolutePath, file.backupPath!) followed by
Deno.rename(file.tempPath, file.absolutePath)) is non-atomic because the
destination can be missing between awaits; change this to an atomic replace by
renaming the new file directly over the destination (use
Deno.rename(file.tempPath, file.absolutePath)) so the target path is never
missing. If you still need a backup, create it first with a non-destructive copy
(e.g., Deno.copyFile(file.absolutePath, file.backupPath!)) and then atomically
replace with Deno.rename(file.tempPath, file.absolutePath); update the loop in
add_reference.ts to use these operations on the
file.tempPath/file.absolutePath/file.backupPath symbols.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/runtime/knop/add_reference.ts`:
- Around line 121-148: The catch block currently awaits operationalLogger.error
and auditLogger.record and can throw, masking the original
KnopAddReference*Error; change it to preserve the original error (capture it as
originalErr), compute the message, then call operationalLogger.error and
auditLogger.record inside their own try/catch blocks (best-effort: swallow/log
any logging failures but do not let them throw), and finally rethrow the
originalErr so the original validation/commit failure is propagated; reference
operationalLogger.error, auditLogger.record and the surrounding catch for the
addReference flow.

In `@tests/integration/knop_add_reference_test.ts`:
- Around line 151-169: The test sinks' async write(record) stubs in the
StructuredLogger used for throwingOperationalLogger and the inner
StructuredLogger passed to AuditLogger must explicitly return a Promise to
satisfy require-await; modify both write implementations (the write methods on
the StructuredLogger instances) to return Promise.reject(new Error("operational
success log failed")) / Promise.reject(new Error("audit success log failed"))
when record.event === "knop.addReference.succeeded" and return Promise.resolve()
otherwise so the failure injection still works but lint passes.

---

Duplicate comments:
In `@src/runtime/knop/add_reference.ts`:
- Around line 501-504: The two-step swap in the loop
(Deno.rename(file.absolutePath, file.backupPath!) followed by
Deno.rename(file.tempPath, file.absolutePath)) is non-atomic because the
destination can be missing between awaits; change this to an atomic replace by
renaming the new file directly over the destination (use
Deno.rename(file.tempPath, file.absolutePath)) so the target path is never
missing. If you still need a backup, create it first with a non-destructive copy
(e.g., Deno.copyFile(file.absolutePath, file.backupPath!)) and then atomically
replace with Deno.rename(file.tempPath, file.absolutePath); update the loop in
add_reference.ts to use these operations on the
file.tempPath/file.absolutePath/file.backupPath symbols.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d23acc5d-f9ff-4d33-9632-ef8eb7f3ce40

📥 Commits

Reviewing files that changed from the base of the PR and between 137b8d6 and a1ef602.

⛔ Files ignored due to path filters (1)
  • documentation/notes/wd.conv.2026.2026-04-04_1537-08-weave-alice-bio-referenced-codex.md is excluded by !documentation/notes/wd.conv.*
📒 Files selected for processing (10)
  • AGENTS.md
  • documentation/notes/wd.general-guidance.md
  • documentation/notes/wd.task.2026.2026-04-04_1553-weave-alice-bio-referenced-woven.md
  • documentation/notes/wd.todo.md
  • src/cli/run.ts
  • src/core/knop/add_reference.ts
  • src/core/knop/add_reference_test.ts
  • src/runtime/knop/add_reference.ts
  • tests/e2e/knop_add_reference_cli_test.ts
  • tests/integration/knop_add_reference_test.ts
✅ Files skipped from review due to trivial changes (4)
  • AGENTS.md
  • documentation/notes/wd.general-guidance.md
  • src/core/knop/add_reference_test.ts
  • src/core/knop/add_reference.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • documentation/notes/wd.todo.md

Comment on lines +151 to +169
const throwingOperationalLogger = new StructuredLogger([{
async write(record: { event: string }) {
if (record.event === "knop.addReference.succeeded") {
throw new Error("operational success log failed");
}
},
}], {
channel: "operational",
});
const throwingAuditLogger = new AuditLogger(
new StructuredLogger([{
async write(record: { event: string }) {
if (record.event === "knop.addReference.succeeded") {
throw new Error("audit success log failed");
}
},
}], {
channel: "security-audit",
}),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix the require-await CI failure in these test sinks.

The write() stubs on Line 152 and Line 162 never await, so deno lint is already failing. Return Promise.reject() / Promise.resolve() explicitly here so the failure injection still works without breaking CI.

Lint-safe rewrite
   const throwingOperationalLogger = new StructuredLogger([{
-    async write(record: { event: string }) {
+    write(record: { event: string }) {
       if (record.event === "knop.addReference.succeeded") {
-        throw new Error("operational success log failed");
+        return Promise.reject(new Error("operational success log failed"));
       }
+      return Promise.resolve();
     },
   }], {
     channel: "operational",
   });
   const throwingAuditLogger = new AuditLogger(
     new StructuredLogger([{
-      async write(record: { event: string }) {
+      write(record: { event: string }) {
         if (record.event === "knop.addReference.succeeded") {
-          throw new Error("audit success log failed");
+          return Promise.reject(new Error("audit success log failed"));
         }
+        return Promise.resolve();
       },
     }], {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const throwingOperationalLogger = new StructuredLogger([{
async write(record: { event: string }) {
if (record.event === "knop.addReference.succeeded") {
throw new Error("operational success log failed");
}
},
}], {
channel: "operational",
});
const throwingAuditLogger = new AuditLogger(
new StructuredLogger([{
async write(record: { event: string }) {
if (record.event === "knop.addReference.succeeded") {
throw new Error("audit success log failed");
}
},
}], {
channel: "security-audit",
}),
const throwingOperationalLogger = new StructuredLogger([{
write(record: { event: string }) {
if (record.event === "knop.addReference.succeeded") {
return Promise.reject(new Error("operational success log failed"));
}
return Promise.resolve();
},
}], {
channel: "operational",
});
const throwingAuditLogger = new AuditLogger(
new StructuredLogger([{
write(record: { event: string }) {
if (record.event === "knop.addReference.succeeded") {
return Promise.reject(new Error("audit success log failed"));
}
return Promise.resolve();
},
}], {
channel: "security-audit",
}),
🧰 Tools
🪛 GitHub Actions: ci

[error] 152-152: deno lint reported error[require-await]: Async method 'write' has no 'await' expression or 'await using' declaration.

🪛 GitHub Check: ci

[failure] 162-162:
�[0m�[1mAsync method 'write' has no 'await' expression or 'await using' declaration.


[failure] 152-152:
�[0m�[1mAsync method 'write' has no 'await' expression or 'await using' declaration.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/integration/knop_add_reference_test.ts` around lines 151 - 169, The
test sinks' async write(record) stubs in the StructuredLogger used for
throwingOperationalLogger and the inner StructuredLogger passed to AuditLogger
must explicitly return a Promise to satisfy require-await; modify both write
implementations (the write methods on the StructuredLogger instances) to return
Promise.reject(new Error("operational success log failed")) / Promise.reject(new
Error("audit success log failed")) when record.event ===
"knop.addReference.succeeded" and return Promise.resolve() otherwise so the
failure injection still works but lint passes.

- preserve the original add-reference error when failed-path logging throws
- use backup copy plus direct staged rename for updated-file commits
- add regression coverage for failed-path logging
@djradon djradon merged commit fe2d1a5 into main Apr 5, 2026
5 of 6 checks passed
@djradon djradon deleted the 08-alice-bio-referenced branch April 5, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant