Begin Handshake CLI checkpoint - #4
Draft
isomorphisms wants to merge 22 commits into
Draft
isomorphisms wants to merge 22 commits into
isomorphisms wants to merge 22 commits into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Start a small read-only Handshake command-line client in Idriç without confusing Handshake's authenticated web application with its documented APIs.
The first analytical target is the relationship between a job posting and Handshake's attached job-role-group classification, so the first two EDU API resources remain separate raw tables keyed by
job_id:/jobs/job_role_groupsThe public job-detail URL is exposed separately and is not treated as the EDU API.
Surface reconciliation
The original draft named seven holes. Current Idriç supplies six directly or with small client-local logic: string cleanup, file input, structural contrib JSON,
System.getEnv, and decimal validation are all implemented.The seventh was the real transport gap. That stack is now explicit:
fetch_to_files_with_headers;make_credential_header, preserving a caller-declared credential on same-origin redirects and stripping it when scheme, host, or port changes.Handshake now uses that surface.
edu_icu_getparses the URL, constructsx-api-keywithmake_credential_header, callsfetch_to_files_with_headers, reads the captured body, cleans its temporary files, and treats nonzero ICU transport results as failures. It does not echo the key in diagnostics.No curl, Python, browser-cookie replay, or Handshake-specific socket path is used by the client.
JSON boundary
Current Idriç already ships
Language.JSONin contrib, so this PR carries no private JSON grammar. Only fields needed for the two raw output tables are decoded into Handshake records; unrelated fields remain parsed JSON and are ignored.Language.JSONrepresents JSON numbers asDouble. Required identifier fields are accepted only when the parsed number converts back to the same integral value. If Handshake emits identifiers outside that exactly representable range, that remains an explicit decoder limitation.Synthetic fixtures only; no private payloads are committed.
Credential redirect acceptance
The Handshake checkpoint now builds the current ICU credential-header stack and runs the real Handshake executable against two deterministic local HTTP origins.
The first origin requires synthetic
x-api-keyon the initial request and again after a same-origin redirect. It then redirects to a second origin. The second origin rejects the request ifx-api-keyis present and returns the committed jobs fixture only when the credential has been stripped.That cross-repository receipt complements ICU #20's own native test, which also proves unrelated custom headers survive while
Authorization,Cookie, and caller-declared credentials are removed cross-origin.Commands
jobsandrolesrequireHANDSHAKE_EDU_API_KEY; missing and empty keys remain separate refusal cases.HANDSHAKE_EDU_BASE_URLexists for deterministic transport acceptance while theurlcommands continue to print Handshake's documented production endpoints.Intentional limits
/jobsand/job_role_groupsobservations stay separate;This PR remains draft while the ICU #13/#20 stack is pending; the client no longer has an application-level fail-closed stub for #19.