Skip to content

docs: record that manifests are located from the repository root only - #29

Merged
modusensus merged 2 commits into
mainfrom
docs/nested-manifest-boundary
Oct 9, 2026
Merged

modusensus merged 2 commits into
mainfrom
docs/nested-manifest-boundary

Conversation

@modusensus

@modusensus modusensus commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Docs only — one boundary recorded, three stale or wrong statements corrected. Found while reviewing PR #28 and then while checking the suite count.

The boundary: manifests are located from the repository root only

deps probes the repository root for the known filenames, so a monorepo sub-package lock is not measured — and audit does not notice, because the version declaration PR #28 added compares the root manifest and nothing else.

Measured rather than read off the code. A fixture whose root package-lock.json pins root-a while packages/app/package-lock.json pins sub-b and sub-c:

audit at head  : {"names":["root-a"],"codes":[]}
deps root only : {"names":["root-a"],"codes":[]}
deps --lockfile: {"names":["sub-b","sub-c"]}

So the remedy is part of the contract now: measure a sub-package by pointing --lockfile at it, or state that it was not measured. Written into docs/fact-contract.md §6.3 and docs/fact-contract-zh.md §6.3 (same position in both, line 360/361), and into dependency-audit.md §A.2 of both skill editions.

This is deliberately not a code change. Making audit enumerate every lock in a tree would change what one audit run means and how many facts it reports; the failure mode being guarded against is exactly that — one manifest standing in for a whole workspace's dependency surface. If the recursive search is wanted, it is its own design question.

The suite count, and what the skip actually keys on

The AGENTS.md row said "1 deliberate skip on non-Windows". That is not the condition — test/bench.test.js skips the exploit ground truth unless tar --version reports bsdtar. From the CI logs of cdece0f:

job tests pass skipped
node 24 on ubuntu-latest 246 245 1 — "the exploit ground truth is defined against bsdtar, not tar (GNU tar) 1.35"
node 24 on windows-latest 246 246 0

And this Windows machine reports 245 pass + 1 skip, because where tar resolves D:\Git\usr\bin\tar.exe (GNU tar 1.35) ahead of C:\Windows\System32\tar.exe. So the number a reader sees depends on PATH, not on the platform — the row now says which machine produced which figure.

README.md carried a second copy of the count (207 tests) and was 39 behind. Nothing compares it, so it was removed rather than updated: one number in one row is checkable, two are drift waiting to happen. The quickstart command itself is unchanged and still what was run — package.json defines test as node --test.

AGENTS.md's description of what cli.test.js pins was also out of date, now fixed to name the manifest-version declaration and the exported pure function that makes the fail-closed branch testable.

Verification

node --test on this branch → tests 246 / pass 245 / fail 0 / skipped 1, which is the local run the corrected row describes, and test/docs-pair.test.js + test/skill-mirror.test.js both stayed green with the four documents edited in pairs.

A review of PR #28 found behaviour none of the documents stated: deps probes the
repository root for known filenames, so a monorepo sub-package lock is not
measured — and audit does not notice, because the version declaration added in
that PR compares the root manifest and nothing else. Measured rather than read
from the code: a fixture whose root package-lock.json pins root-a and whose
packages/app/package-lock.json pins sub-b and sub-c reports only root-a from
both `audit` and `deps --repo`, with an empty code list, while
`euthyna deps --lockfile <sub>` reports sub-b and sub-c.

That makes the remedy part of the contract: measure a sub-package by pointing
--lockfile at it, or say it was not measured. Not a code change — reporting the
root lock while silently ignoring the rest of the workspace would let one
manifest stand in for a whole repository's dependency surface.

Also corrected two stale statements in AGENTS.md: the suite count (235 → 246,
measured today) and the description of what cli.test.js now pins.
@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Sorry @modusensus, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Reviewer's Guide

Documentation-only PR that records the root-only manifest discovery contract across paired fact-contract and skill documents, and updates AGENTS.md for the current 246-test suite and manifest-version declaration behavior. No runtime code changes are introduced; verification reports 245 passing tests and one deliberate skip.

File-Level Changes

Change Details Files
Document the repository-root-only manifest discovery boundary and the required handling of sub-package locks.
  • Record measured behavior showing audit and repository-scoped dependency collection report only the root manifest.
  • Specify per-package deps --lockfile <path> as the way to measure sub-package manifests, or require an explicit unmeasured statement.
  • Mirror the guidance in English and Chinese fact contracts and both skill editions.
docs/fact-contract.md
docs/fact-contract-zh.md
.agents/skills/euthyna-en/references/dependency-audit.md
.agents/skills/euthyna/references/dependency-audit.md
Update project documentation to reflect current test coverage and manifest-version declaration behavior.
  • Correct the documented suite total from 235 to 246 tests, with 245 passing and one deliberate skip.
  • Document that the CLI test coverage includes manifest-version declarations, including byte-identical merge commits and gitignored locks.
  • Clarify in the producer overview that root-only discovery applies and that audit compares the measured root manifest with --head.
AGENTS.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@modusensus

Copy link
Copy Markdown
Contributor Author

@sourcery-ai review

@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Sorry @modusensus, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.

AGENTS.md's test row said "1 deliberate skip on non-Windows". The condition is
not the OS: bench.test.js skips the exploit ground truth unless `tar --version`
reports bsdtar. Measured on cdece0f — ubuntu node 24: 245 pass + 1 skip, with the
reason printed as *defined against bsdtar, not "tar (GNU tar) 1.35"*; windows
node 24: 246 pass + 0 skip. And this Windows machine reports 245 + 1 under Git
Bash, because D:\Git\usr\bin\tar.exe (GNU tar 1.35) resolves ahead of
System32's bsdtar. So the number a reader sees depends on PATH, not platform,
and the row now says which machine produced which figure.

README's quickstart carried a second copy of the count (207 tests) and was 39
behind. Nothing compares it, so it was removed rather than updated: one number
in one row is a fact that can be checked, two are a drift waiting to happen. The
command itself is unchanged and still what was run — package.json defines
`test` as `node --test`.
@modusensus
modusensus merged commit 85cc4be into main Oct 9, 2026
10 checks passed
@modusensus modusensus mentioned this pull request Oct 9, 2026
@modusensus
modusensus deleted the docs/nested-manifest-boundary branch October 9, 2026 22:39
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