Skip to content
774 changes: 725 additions & 49 deletions dag/extdeps/github/app.dag

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions dag/extdeps/uri.dag
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,40 @@ fn uri_wire(uri: Uri) -> NonEmptyStr {
concat(uri_scheme_wire(s: uri.scheme), uri.locator)
}

// TEXT TO Uri IS THE INVERSE OF uri_wire AND THIS MODULE CARRIED ONLY ONE DIRECTION. Every consumer
// decoding a URL an upstream returned had to either keep it as a String - losing the scheme
// distinction uri_scheme_is_http exists to make - or split the prefix itself, which is a second
// authority for the scheme spelling. It is Optional rather than total because a relative reference and
// an unrecognized scheme are genuinely not Uri values here; the locator is rejoined on the same prefix
// so an occurrence of the scheme text INSIDE the locator survives the round trip.
//
// A BARE SCHEME REFUSES RATHER THAN MINTING AN EMPTY NonEmptyStr. "https://" parses a scheme and
// leaves nothing after it, and casting that remainder would produce a Uri whose locator is "" while
// carrying the type whose entire content is non-emptiness -- a fabricated inhabitant, which is the
// silently-wrong value DESIGN 5 forbids rather than a cosmetic sloppiness. It is checked here, at the
// one constructor, rather than by every consumer downstream (caught by review 67524).
fn uri_from_wire(url: String) -> Uri? {
let s = trim(url)
match parse_href_scheme(url: s) {
RelativeHref => none
UnknownHref => none
HrefScheme { scheme: scheme } => {
let prefix = uri_scheme_wire(s: scheme) as String
let locator = join(split(s: s, delimiter: prefix) |> skip(n: 1), prefix)
if starts_with(s, prefix: prefix) && !(locator == "") {
Present {
value: Uri {
scheme: scheme,
locator: locator as NonEmptyStr,
}
}
} else {
none
}
}
}
}

type ParsedHrefScheme
= HrefScheme { scheme: UriScheme }
| RelativeHref
Expand Down
10 changes: 10 additions & 0 deletions dag/gunbc/census_closure_frontier.dag
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import extdeps.github.merge_state { merge_state_graphql_transport_frontier_rows
import extdeps.github.workflow_runs {
conclusion_authority_consolidation_frontier_rows,
}
import extdeps.github.app { modeled_webhook_event_vocabulary_frontier_rows }
import extdeps.github.workflows { create_dispatch_unconsumed_frontier_rows }
import gunbc.public_workload_census {
public_workload_census_replay_consumer_frontier_rows,
Expand Down Expand Up @@ -57,6 +58,11 @@ import product.data_category { data_category_frontier_rows }

import product.fabric.job_admission { job_admission_frontier_rows }
import gunbc.review_sheet_projection { buyer_review_ensure_projection_frontier_rows }
import gunbc.github_app_acquisition { github_app_human_step_frontier_rows }
import gunbc.instruments.github_app_acquire {
census_app_installation_route_frontier_rows,
census_app_custody_handoff_frontier_rows,
}

fn census_closure_frontier_row_groups() -> List<List<FrontierRow>> {
[
Expand All @@ -78,6 +84,10 @@ fn census_closure_frontier_row_groups() -> List<List<FrontierRow>> {
merge_state_graphql_transport_frontier_rows,
conclusion_authority_consolidation_frontier_rows,
create_dispatch_unconsumed_frontier_rows,
modeled_webhook_event_vocabulary_frontier_rows,
census_app_installation_route_frontier_rows,
census_app_custody_handoff_frontier_rows,
github_app_human_step_frontier_rows,
public_workload_census_replay_consumer_frontier_rows,
public_workload_census_run_attempt_consumer_frontier_rows,
public_workload_census_declared_runner_frontier_rows,
Expand Down
1,055 changes: 1,055 additions & 0 deletions dag/gunbc/github_app_acquisition.dag

Large diffs are not rendered by default.

Loading
Loading