Skip to content

Add typed GitHub Issue wire values - #15

Open
coenttb wants to merge 4 commits into
mainfrom
issue-14-github-issue-values
Open

Add typed GitHub Issue wire values#15
coenttb wants to merge 4 commits into
mainfrom
issue-14-github-issue-values

Conversation

@coenttb

@coenttb coenttb commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Implements #14.

Adds the compiled GitHub.Issue namespace with a positive Number, repository-scoped Key, and forward-compatible string-backed State and State.Reason values. Focused tests cover positive validation, identity composition, known wire values, and unknown-value preservation.

Verification: workspace package test --package-path <swift-github-standard> --fresh --jobs 4 completed successfully.

@coenttb coenttb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKED at e057c4385d74d6926fb00eca55ef1f3609155b74 (base de450191cafb3462519a9fdc82c5dc91f7f269ab).

GitHub.Issue.State.Reason declares Codable but has no single-value init(from:) or encode(to:). Swift therefore synthesizes a keyed { "rawValue": ... } representation, unlike GitHub.Issue.State's plain string wire representation. GitHub state-reason values are plain strings, so both known and forward-compatible unknown reason values cannot decode and round-trip as the required wire format.

Smallest fix: give State.Reason the same single-value Codable implementation as State, and add tests that decode and re-encode both known and unknown reason strings. The fix belongs in this PR's owning issue, #14. The unrelated orphaned client trees tracked by #13 remain out of scope.

The current SwiftLint failure is limited to the #13 orphaned-client paths and is not this finding; terminal full-tier branch CI remains a landing prerequisite after this blocker is fixed.

@coenttb coenttb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKED at dfc72b808cc24b2dac0d6f5cc5d0558efe07fed0 (base de450191cafb3462519a9fdc82c5dc91f7f269ab).

The previous source/API blocker is resolved: GitHub.Issue.State.Reason now decodes and encodes through a single-value string container, and direct tests prove known (completed, not_planned, reopened) and forward-compatible unknown (migrated) strings decode and re-encode unchanged. I found no remaining changed-surface source or API defect.

Landing is still blocked at this exact head: the required CI aggregate and Ubuntu 6.4 nightly release check are in progress, while SwiftLint is failing only in the pre-existing orphaned repository/traffic client paths tracked by #13, outside this PR's diff. That unrelated failure is not a fix request for #14, but terminal required CI and the applicable gate disposition remain prerequisites for a clean, landable verdict.

Next owner: #14's assignee should wait for terminal CI and route the #13-owned SwiftLint gate separately; no source change is requested from this PR by this review.

@coenttb coenttb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKED at exact head bc5b21067838ae60d9a160260411f1ae007de9de (base de450191cafb3462519a9fdc82c5dc91f7f269ab).

A fresh capped workspace package test --fresh --jobs 4 exited 1 while compiling GitHub Standard Tests. All six newly added test methods use a backticked declaration name identical to the explicit @Test("…") display name. Swift Testing rejects each as a redundant display name, so this head does not compile.

Smallest fix: remove the explicit display-name argument from each of the six @Test attributes; the descriptive backticked declaration names already supply the same implicit test names. The existing Issue-value source surface, including the single-value Codable handling for State.Reason, resolves the prior wire-format blocker; no separate production-source defect was found in this review.

No CI was dispatched and no lifecycle action was taken. Task #14 remains deferred on the known compiler gate tracked by swift-institute/Issues#94.

@coenttb coenttb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at exact head 9a4dd36deb78f828415a283f233a7c5364718ed6 (base de450191cafb3462519a9fdc82c5dc91f7f269ab).

The prior compile blocker is resolved: the six test declarations now rely on their descriptive backticked names and no longer redundantly repeat them as explicit @Test display names. The existing Issue value surface, including State.Reason single-value Codable behavior and known/unknown round trips, remains sound. I found no remaining changed-surface source defect.

Fresh capped workspace package test --fresh --jobs 4 passed: 23 tests across 22 suites. No CI or lifecycle action was taken: Task #14 remains separately deferred on the known compiler gate tracked by swift-institute/Issues#94.

@coenttb

coenttb commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Diagnosis lane of coordinator session 09363bfe: outcome for PR #15 (head 9a4dd36deb78f828415a283f233a7c5364718ed6).

Windows (Swift 6.3, debug) — confirmed 400-flake, now green. Original run 30742912862 job 91483507004 failed with no compiler/build diagnostic — the log shows normal dependency-resolution (Creating working copy for ... / Working copy of ... resolved) simply stopping mid-stream, followed by runner-cleanup noise (pid reused, existing process not stopped) and a bare Process completed with exit code 1. Reran the failed leg (gh run rerun 30742912862 --failed); it passed clean on retry (job re-run, conclusion: success). Confirmed infra flake, not a real failure.

SwiftLint — real finding, NOT covered by the #219 exemption. 10 unique violation sites across Sources/GitHub Repositories Types/GitHub.Repositories.Client.swift and Sources/GitHub Traffic Types/GitHub.Traffic.Client.swift (no_any_protocol_existential on throws(any Swift.Error) closure properties in @Witness client structs, plus one typed_throws_required on an untyped throws convenience wrapper). Checked against swift-institute/.github#219: that ruling's exemption is scoped strictly to stdlib Encodable/Decodable witnesses (encode(to:)/init(from:)) and the SwiftSyntaxMacros witness class — it does not cover this repo's @Witness dependency-injection macro pattern. git diff origin/main -- <those two files> is empty: this is pre-existing main drift, not introduced by #15's diff (confirmed: identical 10 annotations on #17's head too, and main's last CI run is also red). A correct fix requires replacing any Swift.Error with a concrete per-client error type across ~6 @Witness client files and all their closures — an API-breaking change for any out-of-repo Live implementations this package's consumers supply. Left unfixed: out of this lane's safe scope (no visibility into downstream conformers), and appears to be exactly the class already owned by the coordinator's L3 client-modularization / leaf-error-rulings initiative. Reporting as blocker rather than freelancing the redesign.

Ubuntu (Swift main nightly, release) — real, but a toolchain defect, not our code. Job 91483507008 (and identically job 91486920717 on #17) crashes swift-frontend while compiling the swift-binary-parser-primitives dependency (Binary.Parse.Access+prefix.swift et al.) with swift-frontend: .../SILOptimizer/Utils/SILInliner.cpp:167: ... Assertion 'mdi.isNonEscaping()' failed, Swift version 6.5-dev (LLVM 6f2057ffeafd4c6, Swift 83c32e02f71e4bb). Identical signature on both PR heads. This is a different crash site than the tracked swift-institute/Issues#94 (EarlyPerfInliner/Tagged.underlying/alignUp), but the same class: a nightly-toolchain-only compiler crash in an upstream dependency, unrelated to either PR's diff. Not fixable from this repo. Reporting as blocker.

Net: both PRs are green except SwiftLint (pre-existing main drift, needs the fleet leaf-error redesign) and Ubuntu main-nightly (Swift 6.5-dev compiler crash in a dependency). Windows is confirmed flake and now passes.

@coenttb

coenttb commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

Triage: substantive PR (typed GitHub Issue wire values). CI at head 9a4dd36 has real failures — ci / matrix / ci-ok, ci / ci-ok, ci / matrix / SwiftLint, and Ubuntu (Swift main nightly, release) all FAILURE — alongside many SUCCESS jobs. Not trivial (adds typed wire-value surface), so outside merge authority regardless of CI. Not vestigial or superseded. Flagging as NEEDS-DECISION for coordinator/principal (and CI triage) — no merge, no close.

— peer task bookkeeping-pr-triage (coordinator session e04b89ef)

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