Skip to content

Implement human authentication and session lifecycle in Go #163

Closed

Description

@KalebCole

Derived from the approved architecture in #155 and ADR 0001 (PR #160).

  • Contract surface: auth login/status/logout; auth.expired and
    auth.human_required on authentication lifecycle operations. The first
    protected-command auth.required tracer is deferred to Implement event reads in Go #164 because no
    evidence-complete S0-S2 command legitimately requires a session.
  • Evidence gate: reviewed success/failure/status mappings for
    sendAuthCodeTrusted, getLoginToken, signInWithCustomToken,
    refreshToken, and any required lookupFirebaseUser behavior.
  • Dependencies: S0 and the human-authentication approval gate.
  • Safe verification: scripted remote transcripts, fake private terminal,
    temporary credential store, refresh/expiry tests, and redaction assertions.
    Any evidence capture is owner-attended; automation does not enter
    credentials.
  • Complete when: login only works on a private terminal, refresh is deterministic, persistence is atomic, and no
    identity or credential reaches stdout/stderr.

Tracked dependencies

#161 and the human-authentication approval gate

Activity

  1. self-assigned this
    on Aug 11, 2026
  2. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Dependency #161 is merged. S2 evidence assessment started from 5976533 in isolated branch spec/163-auth-evidence; no credentials, auth codes, browser login, or Go coding will occur before the human-authentication and contract-approval gates.

  3. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    The owner approved a one-time local evidence wizard. It is stored only in session state, writes sanitized HTTP/JSON shape evidence, retains no credentials, and will be deleted after the contract evidence is reviewed. Waiting for the owner to run it in a private terminal.

  4. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    The owner completed the one-time wizard. Sanitized evidence passed an independent privacy scan and contains only HTTP metadata plus JSON paths/types. The evidence agent is now drafting the proposed Remote API contract revision; no additional SMS, real credentials, or Go auth code will be used before review.

  5. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Contract review cycle 1 on PR #176 found blockers: the new auth facts reused an approved revision number, response evidence was over-applied to request/constraint claims, tests did not validate the sanitized artifact semantically, and the human inventory/counts diverged. The evidence agent is correcting these test-first and will rerun the Pacific suite.

  6. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Contract review cycle 2 found three remaining gates: observed wrong-code/invalid-token failures must map to the product failure taxonomy instead of blanket protocol drift; the empty send-code acknowledgment must not claim an unobserved object shape; and proposed/provenance metadata must be exact. The evidence agent is correcting these without another SMS or real credential use.

  7. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Final contract review is clear: Standards 0 findings; Spec 0 findings. All checks pass. Proposed Remote API contract revision 2026-08-11.2 now waits only for owner approval; after approval its status will be changed to owner-reviewed and PR #176 merged before Go auth implementation starts.

  8. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Paused at the mandatory owner-review gate. PR #176 is fully reviewed and green, but proposed remote contract revision 2026-08-11.2 will not be marked owner-reviewed or merged without explicit owner approval. Downstream Go auth and #164/#165 remain correctly blocked.

  9. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Owner explicitly approved proposed Remote API contract revision 2026-08-11.2 in chat. Finalizing owner-reviewed status and merging PR #176; Go S2 implementation may begin after merge.

  10. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Approved Remote API contract revision 2026-08-11.2 merged via PR #176 after deploy-preview and CodeRabbit passed. Beginning the Go S2 implementation from the merged origin/main; no further live authentication or private evidence is required.

  11. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Remote contract revision 2026-08-11.2 merged as 9409346. Go S2 implementation started in isolated branch feat/163-auth-session with end-to-end TDD through app.Execute; no live SMS, credentials, or auth probe will be used.

  12. 6 remaining items

  13. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Additional PR #178 privacy requirement is complete at 8d6261eed5177f3b09c7d29bb69cebf9197d555e.

    The resulting branch tree retains no plaintext private values in the tracked historical auth note. Its useful public transport structure remains with explicit redacted placeholders, and a semantic regression test now requires those redactions while rejecting private-value patterns. No removed value was printed or quoted, and history was not rewritten.

    Validation is green: 19 targeted contract tests, 283 non-live Pacific-time JS tests, TypeScript typecheck, Go race/tests/vet/build/module verification, and the sanitized-source privacy guard. Nothing was merged.

  14. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Contract correction review cycle 2 on PR #178: Standards 0 findings; Spec 1 blocker. The remaining blocker is semantic provenance: response/transport observations were over-applied to full request-shape claims. The implementer is correcting classifications/citations and adding a semantic guard; PR #177 remains blocked.

  15. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    PR #178 review cycle 2 Spec blocker is fixed test-first at 0b3d744ef1942c2c8d0312fe994e8f1ab292b752; Standards reported 0 findings.

    All five authentication request schemas now remain TypeScript-derived inferences with exact preserved request-schema provenance. The semantic guard compares each canonical request body to that source. Observed response metadata/shapes and the separately observed public Firebase key and Referer facts remain dated-live observations. Human and machine ledgers agree; OpenAPI and the 1008 material-claim count are unchanged.

    Validation is green: 20 targeted contract tests, 284 non-live Pacific-time JS tests, TypeScript typecheck, Go race/tests/vet/build/module verification, and privacy/diff guards. No private values were exposed, no live probes ran, and nothing was merged.

  16. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Firebase transport correction PR #178 merged as b396db6. Implementation PR #177 is now updating to Remote API contract 2026-08-11.3, removing unsupported Origin headers, and retaining only the contracted key query parameter plus Referer.

  17. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Fresh audit of merged contract PR #178 found three concrete follow-ups: add Origin uncertainty to the machine ledger, make the OpenAPI Origin guard case-insensitive and cover path-level parameters, and include the cited auth observation in the unsupported-Origin prose scan. The reported delegation concern is not valid: issue #114 contains the owner's explicit end-to-end approval delegation. After two implementer cycles, the orchestrator is taking over these remaining corrections in fix/163-auth-contract-final; PR #177 stays blocked.

  18. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Follow-up contract PR opened from the merged #178 audit: revision 2026-08-11.4 records Origin uncertainty in the machine ledger and strengthens semantic guards across OpenAPI parameter levels and cited evidence. Targeted tests pass; independent Standards and Spec review is next. PR #177 remains blocked.

  19. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Implementation review cycle 1 on PR #177 found six blockers: concrete auth→remote coupling, non-atomic Windows replacement, a double-read session race, missing stable account fingerprint, unsupported callable headers, and stale PR metadata. The implementer is fixing all six test-first against remote contract 2026-08-11.3.

  20. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    Final S2 candidate is pushed to PR #177 at 112fc57 after rebasing onto owner-reviewed Remote API revision 2026-08-11.4. Final independent review is clear: Standards 0 findings; Spec 0 findings. Complete Go race/vet/build/module and Linux/macOS/Windows target checks pass; 20 contract tests, drift tests, 341 non-live JavaScript tests, typecheck, privacy and diff guards pass. Waiting only for repository status checks before squash merge.

  21. KalebCole commented on Aug 11, 2026

    @KalebCole
    OwnerAuthor

    CodeRabbit hardening is complete at 8677e9e: completion-time expiry calculation, signal-safe terminal echo restoration, protected current-user Windows DACLs, sanitized persistence errors, explicit resource cleanup, overflow checks, and aligned status/schema documentation. Exact-head independent clearance remains Standards 0 findings; Spec 0 findings. All Go/target, contract, typecheck, formatting, privacy, and diff checks pass; repository checks are rerunning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions