Summary
docs/library-format.md describes a publish-time comparison between an entry's confidentiality and the library's visibility. No such comparison exists in the code.
Reproduction
- Create a library whose marker has
"visibility": "public".
- Publish an entry with
confidentiality: internal.
- The publish succeeds with no error and no warning.
Expected behavior
The doc makes the claim twice:
- Marker field table:
visibility is "a defense-in-depth hint when CodeCartographer compares against per-entry confidentiality."
- Metadata field table:
confidentiality is "internal (default), shared, or public. Compared against library visibility at publish time."
Actual behavior
Nothing reads marker.visibility. Every marker. access in core/library.ts is .namespaced or .name. visibility appears only in its type declaration, the initLibrary default, and a string inside a core/synthesis.ts error message. confidentiality is only ever declared, copied through buildMetadata, read back in normalizeMetadata, and propagated into the index.
So a documented confidentiality control is absent, and the field reads as a label rather than a check.
Environment
- Surface: both
- CodeCartographer version: 0.16.0 (
77262ad)
Additional context
Two ways to close it, and the choice is a product call rather than a bug fix:
- Implement the comparison. Refuse, or warn, when an entry's
confidentiality is more restrictive than the library's visibility, since that is the direction that leaks. Ordering would be internal < shared < public.
- Drop the claim from the doc and describe both fields as advisory labels.
Worth deciding rather than leaving, because the doc currently offers a guarantee that a shared or public library does not have.
Summary
docs/library-format.mddescribes a publish-time comparison between an entry'sconfidentialityand the library'svisibility. No such comparison exists in the code.Reproduction
"visibility": "public".confidentiality: internal.Expected behavior
The doc makes the claim twice:
visibilityis "a defense-in-depth hint when CodeCartographer compares against per-entryconfidentiality."confidentialityis "internal(default),shared, orpublic. Compared against libraryvisibilityat publish time."Actual behavior
Nothing reads
marker.visibility. Everymarker.access incore/library.tsis.namespacedor.name.visibilityappears only in its type declaration, theinitLibrarydefault, and a string inside acore/synthesis.tserror message.confidentialityis only ever declared, copied throughbuildMetadata, read back innormalizeMetadata, and propagated into the index.So a documented confidentiality control is absent, and the field reads as a label rather than a check.
Environment
77262ad)Additional context
Two ways to close it, and the choice is a product call rather than a bug fix:
confidentialityis more restrictive than the library'svisibility, since that is the direction that leaks. Ordering would beinternal<shared<public.Worth deciding rather than leaving, because the doc currently offers a guarantee that a shared or public library does not have.