-
Notifications
You must be signed in to change notification settings - Fork 57
SCALE-SEAM (103) — acceptance gates, client.ts 589 → 572 #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+170
−32
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
44a6ed4
SCALE-SEAM (95) — element state: two read/write pairs, and why the ma…
claude 121c095
SCALE-SEAM (96) — the as-built question's aggregate reader, and a wit…
claude 2f09a5c
Merge already-squashed (95) branch history
claude 0472f97
SCALE-SEAM (97) — the undo stack, and a destination that looked right…
claude 66ab67a
Merge already-squashed (96) branch history
claude 58525e1
Correct the undo/redo republish docs — all three sites, not just the …
claude 75f8597
SCALE-SEAM (98) — detailing carriers, and a field map total over one …
claude f2926a5
Merge already-squashed (97) branch history
claude 83e149e
SCALE-SEAM (99) — the content shelf, and a destination header that wa…
claude 17103db
Merge already-squashed (98) branch history
claude 2a8f46f
SCALE-SEAM (100) — the element-connection pair, and a destination nam…
claude 6d68219
Merge already-squashed (99) branch history
claude 370a1f8
Merge already-squashed (95)-(100) branch history
claude f5d6751
R22-ENTITLEMENT ⑤ — an agency review comment becomes an RFI somebody …
claude 5c79d56
Merge branch history — reconcile after the (95)-(100) squashes
claude d826115
R22-ENTITLEMENT ⑤ review: promotion claims the comment atomically, an…
claude 9f048eb
Merge branch history after the #434 squash — content already identical
claude c437a7f
R24-REPORTS-BY-MOMENT — a finished pack can be sent, not only downloaded
claude 87cc0e8
Review round on #435: five findings, all verified real, all fixed
claude 67dfc36
Second review round on #435: the port fix is the root cause my first …
claude eff9568
Merge after the #435 squash
claude 0fadd1c
Only committed capital owns anything — cap table and waterfall
claude 87f3a59
Merge after the #436 squash
claude 2fa0692
SCALE-SEAM (101) — design-phase predicted performance, client.ts 642 …
claude 276c4e5
Merge after the #437 squash
claude ea414ab
Portfolio risk heat map — R22-PIPELINE
claude 9ba106e
Review round on #439 — deterministic tie-break, keyboard-operable rows
claude 4ae3e28
Merge remote-tracking branch 'origin/main' into claude/codebase-audit…
claude 27d6f40
Cross-project Gantt — R22-PIPELINE
claude 3f07a03
Review round on #440 — reject normalised dates, require the id separa…
claude 285f262
Merge remote-tracking branch 'origin/main' into claude/codebase-audit…
claude 09a2446
Portfolio resourcing — R22-PIPELINE's last item
claude b614e0b
Merge remote-tracking branch 'origin/main' into claude/codebase-audit…
claude fadc11d
Roadmap truth pass + R39-DECOMP-VIEWER (17)
claude 8c9314d
SCALE-SEAM (102) — counterparty risk, client.ts 603 -> 589
claude c7a58ae
Review fixes on #442, and a gate for the number that keeps drifting
claude a2b33eb
Merge remote-tracking branch 'origin/main' into claude/codebase-audit…
claude e1f1a05
SCALE-SEAM (103) — acceptance gates, client.ts 589 -> 572
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| import { HttpCore } from "./httpCore"; | ||
| import type { DiligenceReadiness } from "./types"; | ||
|
|
||
| /** | ||
| * Acceptance gates — **will an outside party accept this project, and what is blocking it.** | ||
| * | ||
| * SCALE-SEAM (103). Four gates, four different outside parties, one question shape: a single | ||
| * whole-project verdict plus the itemised list of what is standing in its way. | ||
| * | ||
| * | method | who is deciding | the verdict field | what blocks it | | ||
| * |---|---|---|---| | ||
| * | `permitReadiness` | the AHJ | `verdict` | `checklist[].satisfied` + ranked `deficiencies[]` | | ||
| * | `diligenceReadiness` | an investor / acquirer | `go` | `high_risk[]` + `flagged` per category | | ||
| * | `handoverAcceptance` | the owner at turnover | `accepted` | `checks[].ok` | | ||
| * | `validate` | the IDS checker | `status: "pass" \| "fail"` | `specifications[].failed_guids` | | ||
| * | ||
| * ## The witness is that NEITHER the route nor the audience produces this grouping | ||
| * | ||
| * The four routes are `/permit/readiness`, `/diligence/readiness`, `/handover/acceptance` and | ||
| * `/validate` — **four different prefixes**, so a prefix grouping takes one each and this set never | ||
| * forms. The shared leaf word "readiness" reaches only two of the four, so that does not form it | ||
| * either. And the deciding parties are an authority, an investor, an owner and a schema checker — | ||
| * **four different audiences**, so grouping by who reads it fails as well. | ||
| * | ||
| * What does form it is the *shape of the return*: every one of them collapses the whole project to | ||
| * a single accept/refuse verdict and then enumerates what is withholding it. That is a question a | ||
| * caller acts on identically in all four cases — block, or proceed — and the remedy is always to | ||
| * change the project and ask again. | ||
| * | ||
| * This is the second slice to be carried by return shape rather than by name, after (102), where | ||
| * the prefix actively *disagreed* with the seam. Here the prefix does not disagree so much as say | ||
| * nothing at all, which is the weaker but more common case: **four names that share no vocabulary | ||
| * can still be one question.** (85) rejected "they are all multipart uploads", (89) "they are all | ||
| * module records", and `annotate.ts` "they all call `editIfc`" — those are shared mechanisms | ||
| * masquerading as questions. This is the inverse error to avoid: an unshared vocabulary | ||
| * masquerading as unshared subject matter. | ||
| * | ||
| * ## What did NOT come, and why — the exclusions are the load-bearing part | ||
| * | ||
| * **`spineTraceability` stayed**, and it is the closest miss: same domain, same "is this project | ||
| * complete" register, adjacent in the file, and its route `/spine/traceability` is as | ||
| * project-scoped as the four above. It returns `coverage` percentages, `gaps` and a `chain` — | ||
| * and **no verdict field of any kind**. Nothing in it says pass or fail, because it is not a gate: | ||
| * it maps how completely one artefact links to another so a human can decide what to do. A | ||
| * completeness map and an acceptance decision are different questions even when they cover | ||
| * identical ground, and only reading the returns tells them apart. | ||
| * | ||
| * **`editPrecheck` stayed**, and this one is subtler because it genuinely returns a verdict — | ||
| * `{ok, errors, warnings}`. Its SUBJECT is different: it judges a **pending action** ("may I run | ||
| * this recipe with these params"), asked before acting, remedied by changing the parameters you | ||
| * are about to submit, and consumed by enabling or disabling an Apply button. The four above judge | ||
| * a **delivered state**, remedied by changing the project. It also sits beside `addCurtainWall` as | ||
| * the precheck for `editIfc`, so moving it here would separate it from the thing it prechecks. | ||
| * *A verdict about what you are about to do is not a verdict about what you have built.* | ||
| * | ||
| * **`collabSnapshot` was a false positive and is worth recording.** A scan for verdict-shaped | ||
| * returns flagged it, but the match came from the doc comment introducing `permitReadiness` — the | ||
| * next method — not from its own body, which has no verdict at all. A method-body splitter that | ||
| * runs to the next header swallows the comment belonging to that header, so a population derived | ||
| * that way silently inherits its neighbour's vocabulary. The count looked entirely reasonable at | ||
| * six; only reading each candidate caught it. **Derive the complement, then read it — a plausible | ||
| * count is not a checked one.** | ||
| * | ||
| * ## `handoverAcceptance` had been left explicitly unfiled | ||
| * | ||
| * A previous slice parked it under an "UNFILED" note in `client.ts` saying it "needs its home | ||
| * decided by what it ANSWERS rather than by what it sits next to". This slice is that decision. | ||
| * The note is narrowed rather than deleted, because the other two it names are still unfiled. | ||
| */ | ||
| // The mixin shape TS requires — same declaration as every other `with*` module in this directory. | ||
| type Ctor<T> = new (...args: any[]) => T; | ||
|
|
||
| export function withAcceptanceGates<TBase extends Ctor<HttpCore>>(Base: TBase) { | ||
| return class AcceptanceGates extends Base { | ||
| /** PERMIT-CHECK: submission-readiness — checklist + ranked deficiencies + verdict (409 without a model). */ | ||
| permitReadiness(pid: string) { | ||
| return this.json<{ | ||
| verdict: string; readiness_pct: number; approvability_score: number; | ||
| checklist: { requirement: string; satisfied: boolean; evidence: string }[]; | ||
| deficiencies: { item: string; severity: string; action: string }[]; | ||
| }>(`/projects/${pid}/permit/readiness`); | ||
| } | ||
|
|
||
| /** Investor/acquirer gate: `go` plus the diligence items and entitlements holding it back. */ | ||
| diligenceReadiness(pid: string) { | ||
| return this.json<DiligenceReadiness>(`/projects/${pid}/diligence/readiness`); | ||
| } | ||
|
|
||
| /** Owner turnover gate: `accepted` plus the per-check breakdown of what is not ready. */ | ||
| handoverAcceptance(pid: string) { | ||
| return this.json<{ accepted: boolean; checks: { key: string; label: string; ok: boolean }[]; | ||
| metrics: Record<string, number>; note: string }>(`/projects/${pid}/handover/acceptance`); | ||
| } | ||
|
|
||
| /** | ||
| * IDS gate: `status` plus, per specification, the GUIDs that failed it. | ||
| * | ||
| * Uses bare `fetch` rather than `this.json` — kept exactly as it was, because changing the | ||
| * transport of a method while moving it makes a behavioural change look like an extraction. | ||
| */ | ||
| validate(pid: string) { | ||
| return fetch(this.url(`/projects/${pid}/validate`), { method: "POST" }) | ||
| .then((r) => r.json() as Promise<ValidationResult>); | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
| * The IDS validation report. Defined here rather than in `types.ts` because `validate` is its only | ||
| * consumer in the tree — it moved out of `client.ts` with the method that returns it, so nothing is | ||
| * left behind pointing at a method that is no longer there. | ||
| */ | ||
| export interface ValidationResult { | ||
| title: string; | ||
| status: "pass" | "fail"; | ||
| summary: { specifications: number; passed: number; failed: number }; | ||
| specifications: { name: string; status: "pass" | "fail"; applicable: number; passed: number; failed: number; failed_guids: string[] }[]; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.