gosalyn: Case 2 C2-01c brief round d2 for Webby d1: gate grep scoped to packages and docs/case2 with the six owned hits named, draft frozen with books [], hybrids may have universe-level prefixes, tests for a prefix equal to a book and for prefixes-first order (webby-0090 B1 N1 N2, mos-1240)
This commit is contained in:
1 parent
524e169b8c
commit
28e3d82265
1 file changed
+16
-7
@@ -1234,10 +1234,12 @@ From the ruling, which wins if this brief and it disagree:
|
||||
- `kind` is absent for a plain universe, `"hybrid"` or `"draft"`. Any other value refuses
|
||||
`library-mapping-invalid`. A draft takes only `kind`, `name` and `playground`, and needs at least one
|
||||
prefix. A draft with `books` refuses `library-mapping-invalid`. A plain universe and a hybrid keep
|
||||
their key lists.
|
||||
their key lists. `checkMapping` returns a draft frozen as `{kind: 'draft', name, books: [],
|
||||
playground}`, so every reader of `books`, `classify` included (`scope.mjs:11`), gets a list.
|
||||
- Three levels, set by where a prefix sits. Book level is a prefix inside one of the entry's own book
|
||||
folders, as now. Universe level is a prefix in a plain universe's `playground` that lies outside every
|
||||
book folder of every entry. A draft's prefixes lie outside every book folder.
|
||||
folders, as now. Universe level is a prefix in a plain universe's or a hybrid's `playground` that lies
|
||||
outside every book folder of every entry. A hybrid may have `books: []` and still have universe-level
|
||||
prefixes, and their files take the hybrid's id as `universe`. A draft's prefixes lie outside every book folder.
|
||||
- Refusals. A prefix inside, or holding, another entry's book folder refuses
|
||||
`library-playground-other-universe`. A prefix holding one of its own entry's book folders, or equal to a
|
||||
book folder, refuses `library-mapping-invalid`. The rules that no prefix holds another and none is
|
||||
@@ -1256,11 +1258,15 @@ From the ruling, which wins if this brief and it disagree:
|
||||
|
||||
Tests:
|
||||
- One case per level. A book-level file has its universe and book. A universe-level file has its
|
||||
universe and `book: null`. A draft file has the draft's id and `book: null`. A `.canvas` under a prefix
|
||||
universe and `book: null`, in a plain universe and in a hybrid. A draft file has the draft's id and `book: null`. A `.canvas` under a prefix
|
||||
stays `unmapped`.
|
||||
- One case per refusal: a prefix inside another entry's book, a prefix holding another entry's book, a
|
||||
prefix holding its own book, a draft with `books`, a draft with no prefix, an unknown `kind`, a hybrid
|
||||
prefix holding its own book, a prefix equal to a book folder (`mapping.test.mjs:20`'s `'Book One/'`
|
||||
moves to `library-mapping-invalid`), a draft with `books`, a draft with no prefix, an unknown `kind`, a hybrid
|
||||
source naming a draft, and two overlapping prefixes in different entries.
|
||||
- A draft comes back from `checkMapping` frozen with `books: []`.
|
||||
- Prefixes first: a canon file in a book that holds a prefix, outside that prefix, stays `canon`, and a
|
||||
file under the prefix is `playground`.
|
||||
- A reader case: a canon file linking into a draft gives R6, and linking into a universe-level prefix of
|
||||
its own universe gives R5.
|
||||
- `business.test.mjs` refuses the moved prefix with the new code through `validateBusinessDocument`.
|
||||
@@ -1276,8 +1282,11 @@ verb. Hybrid `exclude` and `pin` (C2-15).
|
||||
### Gate
|
||||
|
||||
Webby approves the manifest. The library and business suites are green on Sage's gate, along with every
|
||||
`scripts/test-*.sh`. Grep `packages/*/tests` and `docs` for `library-playground-outside-book` before
|
||||
in-review: no hit may remain.
|
||||
`scripts/test-*.sh`. Before in-review, grep `packages` (`src`, `tests` and `README.md` files) and
|
||||
`docs/case2` for `library-playground-outside-book`: no hit may remain. At 6ba8a582e the hits are
|
||||
`mapping.mjs:84`, `packages/library/README.md:44`, `mapping.test.mjs:16-20` and `:72`,
|
||||
`business.test.mjs:25` and `SURVEY-RUN.md:114`, all owned above. The plans and `agents/` keep the old
|
||||
code as history.
|
||||
|
||||
### Handoffs
|
||||
|
||||
|
||||
Reference in new issue
Block a user