Skip to content
Merged
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
5fa77cc
WIP: proud-lynx-311
briansrls May 5, 2026
d07d9e5
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 5, 2026
9fae986
WIP: proud-lynx-311
briansrls May 5, 2026
31d31c7
WIP: proud-lynx-311
briansrls May 5, 2026
a2a71cf
WIP: proud-lynx-311
briansrls May 5, 2026
eaf3cbd
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 5, 2026
a402dca
chore(v3): regen bootstrap snapshot for substrate.dag :83 anchor swap
briansrls May 5, 2026
c75787f
fix(:425): retire trailing `§P5` shorthand on r2-manager-brief-author…
briansrls May 5, 2026
3881255
test(v3): refresh parse_corpus_manifest after substrate.dag :83 ancho…
briansrls May 5, 2026
1dfd2c4
ci: re-trigger v3 after t_demo_fixture transient flake
briansrls May 5, 2026
9e67e1f
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 5, 2026
0104864
fix(:425): align link URL with anchor label on r2-manager-brief-autho…
briansrls May 5, 2026
074a819
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
3cc9af0
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
e69e9e4
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
043e1b2
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
1de1c2d
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
01351da
WIP: proud-lynx-311
briansrls May 6, 2026
c30ddd9
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
04b5eef
feat(std): T-Numeric-Construction S9 Phase-1 — UInt = CommutativeMono…
briansrls May 6, 2026
acf05e9
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
4675e08
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
5975930
fix(std): UInt = Nat (preserve CommutativeSemiring surface)
briansrls May 6, 2026
842bf65
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
ce14078
test(v3): refresh parse-snapshot manifest for integer.dag UInt change
briansrls May 6, 2026
98e7442
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
ac635f4
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
3b968cc
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
982fe11
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
8e07464
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
eb1907c
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
e02dece
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
af2c915
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
3c53b09
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
48debea
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
b131e86
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
0229154
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
f5e5b6a
WIP: proud-lynx-311
briansrls May 6, 2026
bd074b4
test(v3): refresh parse-snapshot manifest for Slice 2 types.dag edit
briansrls May 6, 2026
e408006
WIP: proud-lynx-311
briansrls May 6, 2026
33eb0d1
fix(std): partial Slice 2 — NonNegativeInt only; PositiveInt stays Int
briansrls May 6, 2026
09fb989
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
99d0c9c
WIP: proud-lynx-311
briansrls May 6, 2026
92758dd
feat(v3): T-Numeric-Construction S9 Slice 2.5 — predicate registry + …
briansrls May 6, 2026
7ead9d2
WIP: proud-lynx-311
briansrls May 6, 2026
e269843
fix(v3): apply cargo fmt to placeholder format! macro
briansrls May 6, 2026
788d6ac
fix(v3): Slice 2.5 — predicate registry carries allowed-carrier check
briansrls May 6, 2026
75e3572
WIP: proud-lynx-311
briansrls May 6, 2026
2cf60fe
feat(v3): Slice 2.5 Path (a) — predicate registry arg-shape contract …
briansrls May 6, 2026
b750eea
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
09b2ac2
fix(v3): Slice 2.5 — sweep KNOWN_PREDICATE_REGISTRY naming drift; fix…
briansrls May 6, 2026
0429576
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
5aca61b
feat(v3): Slice 2.5 Path (a) Rung 3 — gt_zero body synthesis lowers r…
briansrls May 6, 2026
cfc3922
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
f3e49b9
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
c94e61e
fix(v3): Slice 2.5 — reject duplicate record-shape fields in register…
briansrls May 6, 2026
48e1a7f
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
77658b7
WIP: proud-lynx-311
briansrls May 6, 2026
0ee9ad3
feat(v3): Slice 2.5 Path (a) Rung 3 — range body synthesis lowers rea…
briansrls May 6, 2026
a1442ba
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
ad34665
fix(v3): Slice 2.5 — Bare predicate rejects zero-arg-call form
briansrls May 6, 2026
23ba20e
WIP: proud-lynx-311
briansrls May 6, 2026
5f3c40c
chore(v3): Slice 2.5 — defer non_empty/brand body synthesis (discharg…
briansrls May 6, 2026
6717038
WIP: proud-lynx-311
briansrls May 6, 2026
97d81e2
fix(v3): Slice 2.5 — disable range body synthesis (int-routing cascade)
briansrls May 6, 2026
d43b4a6
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
9dff233
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
d89db1e
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
9b07111
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
6c23a7c
feat(v3): Slice 2.5 Option A revised — pattern/format/content removed…
briansrls May 6, 2026
6159390
test(v3): Slice 2.5 — cement pattern/format/content registry-absence …
briansrls May 6, 2026
a7a2e3c
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
3cd5eb4
docs(v3): Slice 2.5 — fix stale lower_type_alias_refinements_phase ru…
briansrls May 6, 2026
d166317
fix(v3): Slice 2.5 — update pre-Option-A test to current registry sur…
briansrls May 6, 2026
8e9d6e9
WIP: proud-lynx-311
briansrls May 6, 2026
8eb8301
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
79c4da0
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
e1ec3d1
feat(v3): Slice 2.5 Path (a) Rung 3 — brand body synthesis lowers rea…
briansrls May 6, 2026
b0695ff
WIP: proud-lynx-311
briansrls May 6, 2026
c999493
fix(v3): brand cement test uses Int carrier (parser quirk on String w…
briansrls May 6, 2026
d65051d
feat(v3): Slice 2.5 — mixed-clause fail-closed; revert brand body syn…
briansrls May 6, 2026
298c1d2
fix(v3): Slice 2.5 — Practice 4 enum classification + gt_zero body-sh…
briansrls May 6, 2026
4a42cb1
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
3127bbf
Merge remote-tracking branch 'origin/main' into session/proud-lynx-311
briansrls May 6, 2026
6e3465c
feat(v3): Slice 2.5 — range body synthesis re-enabled (Gap 3 resolved)
briansrls May 7, 2026
1b570c3
fix(v3): Slice 2.5 — nested-And aggregation collects per-leaf names r…
briansrls May 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions dsl/std/integer.dag
Original file line number Diff line number Diff line change
Expand Up @@ -110,27 +110,31 @@ type UInt128 = Semiring<Word128>
type Int = AbelianGroup<GroupCompletion<Nat>>
type UInt = Nat

// Nat-alignment refinement (S9 Slice 2 / Phase-4, partial).
// Nat-alignment refinements (S9 Slice 2 / Slice 2.5 / Phase-4).
//
// NonNegativeInt formerly lived in dsl/std/types.dag refining Int with a
// non-negative range predicate. Slice 2 Nat-alignment (dispatch
// gunbc#1739 issuecomment-4389870320) migrates the algebra-side carrier to
// Nat: non-negativity is structural to Nat by construction (the canonical
// natural-number carrier), not a refinement over Int. Refining Int for
// non-negativity projects out Nat's structural property — the same modeling
// fault Codex's BLOCKING review on PR #1818 caught for UInt as a
// CommutativeMonoid wrap of Nat. Declared here (not in std.types) because
// this module imports std.nat directly; locating in std.types would require
// an std.types to std.nat import edge that triggers a circular-dependency
// false-positive during transitive load of test fixtures via std.render
// chains.
//
// PositiveInt remains in std.types refining Int for this slice — the
// resolver does not currently entail predicate ranges over Nat (only over
// Int and Int-row carriers). Per dispatch STOP-AND-ESCALATE bullet 2
// (predicate-entailment failure), surfacing as a gap; PositiveInt's
// Nat-alignment sequences after predicate-entailment substrate supports
// ranges over Nat.
// non-negative range predicate. Slice 2 Nat-alignment migrates the
// algebra-side carrier to Nat: non-negativity is structural to Nat by
// construction (the canonical natural-number carrier), not a refinement
// over Int. Refining Int for non-negativity projects out Nat's structural
// property — the same modeling fault Codex's BLOCKING review on PR #1818
// caught for UInt as a CommutativeMonoid wrap of Nat. Declared here (not
// in std.types) because this module imports std.nat directly; locating in
// std.types would require an std.types to std.nat import edge that
// triggers a circular-dependency false-positive during transitive load of
// test fixtures via std.render chains.
//
// PositiveInt migrates to Nat-where-gt_zero per S9 Slice 2.5 (Path 3
// RATIFIED at gunbc#828 issuecomment-4390333451). The gt_zero primitive
// IS the reason for "Nat without zero" / "Nat above structural bound"
// (Director Option 2 ratification at gunbc#828 issuecomment-4390199218);
// the prior range(min: 1) over Int was a misleading label that treated
// Nat's lower-bound = 0 as a contingent rather than structural fact.
// gt_zero is enrolled in the lowerer's predicate registry
// (KNOWN_PREDICATES in src/v3/compiler/src/lower.rs), which
// retired the prior PB-1 file-path special case.
type NonNegativeInt = Nat
type PositiveInt = Nat where gt_zero

// ─── Diagnostic enumeration order (Modeling problem 4; slice 2) ─────────────
//
Expand Down
68 changes: 44 additions & 24 deletions dsl/std/types.dag
Original file line number Diff line number Diff line change
Expand Up @@ -227,32 +227,43 @@ type Map<key, value> = PartialFunction<key, value>
// 2. Auto-generation of test inputs (valid from [T], invalid from [T]^c)
// 3. Documentation of expected shapes

type CommitSha = String where pattern("^[a-f0-9]\{40\}$")
type Sha256 = String where pattern("^[a-f0-9]\{64\}$")
// S9 Slice 2.5 (Director Option A revised RATIFIED at gunbc#828
// `issuecomment-4392245968`): pattern / format / content predicates are
// structurally absent from the predicate registry until Q-Regex-Primitive
// substrate-fact-introduction lands. The where-clauses on the types below
// dropped from this slice; restore the original predicate when the
// registry re-includes pattern / format / content. The original
// where-clause text appears in each type's preceding comment for the
// restoration receipt.
//
// CommitSha: restore `where pattern("^[a-f0-9]{40}$")` post-Q-Regex.
type CommitSha = String
// Sha256: restore `where pattern("^[a-f0-9]{64}$")` post-Q-Regex.
type Sha256 = String
type RetryCount = Int where range(min: 1, max: 5)
type HttpStatus = Int where range(min: 100, max: 599)
type Email = String where pattern("^[^@]+@[^@]+\\.[^@]+$")
// Email: restore `where pattern("^[^@]+@[^@]+\\.[^@]+$")` post-Q-Regex.
type Email = String
type Port = Int where range(min: 1, max: 65535)
type GistId = String where format(uuid)
// GistId: restore `where format(uuid)` post-Q-Regex (format predicate
// re-enrolled).
type GistId = String
type Secret nominal_opaque = String
type SecretValue = Secret where non_empty
type Url = String where pattern("^https?://")
type SemVer = String where pattern("^\\d+\\.\\d+\\.\\d+")
// Url: restore `where pattern("^https?://")` post-Q-Regex.
type Url = String
// SemVer: restore `where pattern("^\\d+\\.\\d+\\.\\d+")` post-Q-Regex.
type SemVer = String
type NonEmptyStr = String where non_empty
type LanguageId = String where non_empty
type SecretName = String where non_empty
// `NonNegativeInt` migrated to `Nat` (canonical-instance alias) per S9 Slice 2
// Nat-alignment — declaration moved to `dsl/std/integer.dag` (which already
// imports `std.nat { Nat }`); locating it here would require an
// `std.types -> std.nat` import edge that triggers a circular-dependency
// false-positive during transitive load of test fixtures via `std.render`
// chains. Consumers should `import std.integer { NonNegativeInt }`.
//
// `PositiveInt` STAYS on `Int where range(min: 1)` here for this slice;
// resolver does not currently entail `where range(min: …)` predicates over
// `Nat`. Surfaced as a gap per dispatch STOP-AND-ESCALATE; migration
// sequences after predicate-entailment substrate supports `range` over Nat.
type PositiveInt = Int where range(min: 1)
// `NonNegativeInt` and `PositiveInt` migrated to Nat-based shapes per S9
// Slice 2 / Slice 2.5; declarations now live in `dsl/std/integer.dag`
// (which already imports `std.nat { Nat }`) — locating them here would
// require an `std.types -> std.nat` import edge that triggers a
// circular-dependency false-positive during transitive load of test
// fixtures via `std.render` chains. Consumers should
// `import std.integer { NonNegativeInt, PositiveInt }`.

// Path modeling (EX-2):
// - FilePath remains a compatibility alias for existing modules.
Expand Down Expand Up @@ -287,7 +298,8 @@ type SourceSpan {
end: Int
}

type Timestamp = String where pattern("^\\d\{4\}-\\d\{2\}-\\d\{2\}T\\d\{2\}:\\d\{2\}:\\d\{2\}")
// Timestamp: restore `where pattern("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}")` post-Q-Regex.
type Timestamp = String
type EpochMs = Int where range(min: 0)
type Duration = Int where range(min: 0)
type Milliseconds = Int where range(min: 0), brand("Milliseconds")
Expand Down Expand Up @@ -320,8 +332,11 @@ type GitRef = String where non_empty
// but a ref is not always a SHA (e.g., "main", "HEAD~1").

// --- GCP / OIDC types (refinements for cloud identifiers) ----------------
type GcpProjectId = String where non_empty, pattern("^[a-z][a-z0-9-]{4,28}[a-z0-9]$")
type ServiceAccountEmail = String where pattern("^[a-z][a-z0-9-]*@[a-z0-9-]+\\.iam\\.gserviceaccount\\.com$")
// GcpProjectId: restore `where non_empty, pattern("^[a-z][a-z0-9-]{4,28}[a-z0-9]$")` post-Q-Regex.
// Pattern half dropped; non_empty half kept as it migrates via the registry.
type GcpProjectId = String where non_empty
// ServiceAccountEmail: restore `where pattern("^[a-z][a-z0-9-]*@[a-z0-9-]+\\.iam\\.gserviceaccount\\.com$")` post-Q-Regex.
type ServiceAccountEmail = String

// Refinement chain example (transitive subtyping):
// [Url] < [NonEmptyStr] < [String] < [Json]
Expand Down Expand Up @@ -413,13 +428,18 @@ type SymlinkTarget
// [FilePath] !<= [TextFilePath] -> "cannot prove content is text"
// The developer must insert an explicit classification step.

type TextFilePath = FilePath where content(Text)
type BinaryFilePath = FilePath where content(Binary)
// TextFilePath: restore `where content(Text)` post-Q-Regex / content-typing
// substrate. Content-typing carved with regex predicate as parallel
// substrate-fact-introduction.
type TextFilePath = FilePath
// BinaryFilePath: restore `where content(Binary)` post-content-typing landing.
type BinaryFilePath = FilePath

// FileEntry / FileClassification: std/filesystem.dag — one record, alias
// name for probe-shaped API; Encoding from std/encoding.dag.

type MimeType = String where pattern("^[a-z]+/[a-z0-9.+-]+$")
// MimeType: restore `where pattern("^[a-z]+/[a-z0-9.+-]+$")` post-Q-Regex.
type MimeType = String

// File type rules -- declarative extension-to-encoding mapping.
// This is compile-time data the compiler uses for:
Expand Down
Loading
Loading