Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a6edfcd
V48 Gate 1: Repair wallet OAuth redirect_to allow-list defeat; land p…
geraldarthurdavis Jun 12, 2026
a36e0bf
V48 Gate 1: Derive wallet binding from the session OAuth identity
geraldarthurdavis Jun 12, 2026
716f869
V48 Gate 1: Record verified identity-derived wallet binding in QA ledger
geraldarthurdavis Jun 12, 2026
66127d1
V48 Gate 1: Record F9 — org authority denied-by-default for solo oper…
geraldarthurdavis Jun 12, 2026
975a145
V48 Gate 1: Record cold-state wallet sign-up verification
geraldarthurdavis Jun 12, 2026
066a11d
V48 Gate 1: Record F10 — GitHub App sessionless install staging has n…
geraldarthurdavis Jun 12, 2026
a063e19
V48 Gate 1: Reflect identity-auth QA repairs and specification intent…
geraldarthurdavis Jun 12, 2026
32bea7f
V48 Gate 1: Refresh built package type declarations
geraldarthurdavis Jun 12, 2026
42782c1
V48 Gate 1: Record GitHub App install redirect mechanics and legacy O…
geraldarthurdavis Jun 12, 2026
8075e3b
V48 Gate 1: Record F11 — GitHub webhook URL targets a route with no P…
geraldarthurdavis Jun 12, 2026
7ff8a20
V48 Gate 1: Record GitHub App env placeholder finding and recovery path
geraldarthurdavis Jun 12, 2026
d7fb778
V48 Gate 1: Land GitHub connect on /packs with Externals overlay open
geraldarthurdavis Jun 12, 2026
2bd7cf5
V48 Gate 1: Show all connected repositories; establish V48 QA SQL scr…
geraldarthurdavis Jun 12, 2026
254ac30
V48 Gate 1: Record Track 1 rollup green; session persistence verified
geraldarthurdavis Jun 12, 2026
ed824fc
V48 Gate 1: Retarget auxillaries repair/recovery routes from /termina…
geraldarthurdavis Jun 12, 2026
79127d1
V48 Gate 1: Defer optional-email QA; wallet plus GitHub is the identi…
geraldarthurdavis Jun 12, 2026
ebe2490
V48 Gate 1: Add live on-chain BTC balance to the Wallet pane
geraldarthurdavis Jun 12, 2026
828093c
V48 Gate 1: Track 1 complete — live BTC balance verified, payment-add…
geraldarthurdavis Jun 12, 2026
630ee98
V48 Gate 1: Update Track 1 rollup for reconnect auth_source; family a…
geraldarthurdavis Jun 12, 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
36 changes: 36 additions & 0 deletions BITCODE_SPEC_V48_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
- Prior generated proof appendix: `BITCODE_SPEC_V46_PROVEN.md`
- V48 state: notes-only draft opening
- Scope: V48 starts as the interactive local experiential QA target over promoted V47 commercial website testnet launch canon.
- QA findings ledger: `BITCODE_V48_QA.md` (the running record of accepted V48 findings and repairs)
- Gate 1 (in progress): identity and authentication interactive QA on branch `v48/gate-1-identity-auth-interactive-qa`
- Full draft family (`BITCODE_SPEC_V48.md`, `BITCODE_SPEC_V48_DELTA.md`, `BITCODE_SPEC_V48_PARITY_MATRIX.md`) opens in a dedicated specification-authoring gate once the interactive QA tracks have accumulated the specification intent; Gate 1 closed as the identity/authentication QA-and-repairs gate

## Notes-only draft rule

Expand Down Expand Up @@ -53,6 +56,39 @@ deployed staging-testnet system end to end, step by step, and fix what breaks.
- Ledgerized journaling: replayability, auditability, `/packs` page UX/UI, and
the personal (Auxillaries) history of work.

## V48 Gate 1 in progress: identity and authentication interactive QA

Gate 1 exercises the live commercial testnet experience exactly as the
notes-only rule directs: interactively, recording accepted findings in
`BITCODE_V48_QA.md` (F1-F10 so far), and landing fail-closed repairs on the
gate branch. The full draft family is authored at Gate 1 closure from this
QA-driven specification intent.

Accepted findings converted to repairs so far:

- Supabase `redirect_to` law: GoTrue validates the Auth redirect allow-list by
exact string match, so `redirect_to` must stay query-free. The post-auth
destination travels through origin-local storage
(`uapi/lib/supabase-auth-redirect.ts`) and is consumed once by the callback.
This repaired wallet sign-in from both localhost and production www, which
previously stranded the PKCE verifier and never minted a session.
- Identity-derived wallet binding: the canonical wallet sign-up signs on the
OAuth provider authorize page, so nothing is staged client-side to replay.
`/api/wallet/authenticate` now derives the binding server-side from the
session's GoTrue-verified `custom:bitcode-bitcoin` identity
(`source: 'oauth-identity'`), and `WalletSessionPersistenceBridge` triggers
it whenever a wallet-backed session has no replayable local proof.
- Post-auth landing is `/packs`, not the legacy `/terminal` overlay route.

Specification intent surfaced for the eventual V48 family (decisions, not yet
law): eradicate legacy email/phone authentication residue (`/login`,
`LoginForm`, PhoneSSO) and the legacy `/terminal` route after verifying its
capabilities ported to `/packs`, `/read`, and `/deposit`; decide the
solo-operator organization-authority posture (personal-organization bootstrap
at wallet sign-up versus a neutral unconfigured state); complete the GitHub
App sessionless install staging path, whose pending-installation cookie
currently has no consumer.

## Non-goals during V48 opening

- Do not implement V48 product behavior from this notes-only opening.
Expand Down
168 changes: 168 additions & 0 deletions BITCODE_V48_QA.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/agent-generics/src/agents/factories.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* purpose: Create type-safe agent executors
* pattern: factory-functions
*/
import { Executor } from '@bitcode/execution-generics';
import { Execution } from '@bitcode/execution-generics/Execution';
import type { Executor } from '@bitcode/execution-generics';
import type { Execution } from '@bitcode/execution-generics/Execution';
import { Agent, AgentStep } from '../types';
import { z } from 'zod';
export type BitcodePTRRStepName = 'plan' | 'try' | 'refine' | 'retry';
Expand Down Expand Up @@ -120,7 +120,6 @@ export declare function factoryAgentWithPTRRGenerations<TInput, TOutput>(config:
backoff?: number;
};
}): Agent<TInput, TOutput>;
export {};
/**
* factoryQuickAgent - Preferred minimal agent for simple, single-step behaviors.
*
Expand All @@ -136,3 +135,4 @@ export declare function factoryQuickAgent<TInput, TOutput>(config: {
description?: string;
execute: (input: TInput, execution: Execution) => Promise<TOutput>;
}): Executor<TInput, TOutput>;
export {};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Execution } from '@bitcode/execution-generics/Execution';
import type { Execution } from '@bitcode/execution-generics/Execution';
export declare function logLLMSubstepStart(execution: Execution, sequence: string, systemPrompt: string, userPrompt: string, combinedPrompt: string, llmConfig?: {
model?: string;
provider?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-generics/src/diagnostics/trace.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Execution } from '@bitcode/execution-generics/Execution';
import type { Execution } from '@bitcode/execution-generics/Execution';
export interface ExecutionTraceNode {
id: string;
type: 'agent' | 'step' | 'substep' | 'execution';
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-generics/src/steps/factories.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* The 7-substep sequence:
* 1. PrepareConciseContext (CONTEXT SIGNAL/NOISE) → Reason→Judge→StructuredOutput
* 2. ChunkThenSum (BIG INPUT) → Reason→Judge→StructuredOutput
* 3. StitchUntilComplete (CONVERSATIONSUTPUT) → Reason→Judge→StructuredOutput
* 3. StitchUntilComplete (large output handling) → Reason→Judge→StructuredOutput
* 4. Tool execution (AFTER all failsafes, conditional on reasoning + judgment output)
*/
import { Executor } from '@bitcode/execution-generics';
Expand Down
4 changes: 2 additions & 2 deletions packages/agent-generics/src/substeps/factories.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '@bitcode/execution-generics';
import { Execution } from '@bitcode/execution-generics/Execution';
import type { Executor } from '@bitcode/execution-generics';
import type { Execution } from '@bitcode/execution-generics/Execution';
import { SubStepExecution } from '../execution';
import { z } from 'zod';
import { PreparedContext, Reasoning, UseTool, Judgment, UsedTool } from '../types';
Expand Down
4 changes: 2 additions & 2 deletions packages/agent-generics/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Agents organize Actions, Actions sequence Steps, Steps sequence GenerationSteps.
*/
export type { PreparedContext } from '@bitcode/context';
import { Executor } from '@bitcode/execution-generics';
import type { Executor } from '@bitcode/execution-generics';
import { Tool } from '@bitcode/tools-generics';
/**
* Agent Variation Steps - The four fundamental steps
Expand Down Expand Up @@ -111,7 +111,7 @@ export type StepExecutor<TInput = any, TOutput = any> = Executor<TInput, TOutput
/**
* AgentGeneration - Preferred alias for AgentStep. A Generation is a typed
* executor (input → output) that may be composed by PTRR failsafes and tools
* postprocess. AgentStep remains the concrete execution shape.
* postprocess. AgentStep remains the concrete execution shape.
*/
export type AgentGeneration<TInput = any, TOutput = any> = AgentStep<TInput, TOutput>;
/**
Expand Down
14 changes: 7 additions & 7 deletions packages/api/src/routes/auxillaries-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ export function buildOrganizationPolicyAuthority(input: {
readString(profile?.multiSigPolicyRoot) ??
null,
},
recoveryRoute: '/terminal?auxillary-open-to=profile',
recoveryRoute: '/packs?auxillary-open-to=profile',
});
}

Expand Down Expand Up @@ -1498,7 +1498,7 @@ export function buildAuxillariesReadinessDiagnostics(input: {
severity: readiness.connected ? 'warning' : 'blocking',
summary: `${readiness.provider} provider readiness requires repair.`,
requiredAction: readiness.requiredRepairAction,
repairRoute: '/terminal?auxillary-open-to=externals',
repairRoute: '/packs?auxillary-open-to=externals',
retryPolicy: 'after_repair',
}));
}
Expand All @@ -1511,7 +1511,7 @@ export function buildAuxillariesReadinessDiagnostics(input: {
severity: 'blocking',
summary: 'Wallet binding is missing for settlement-adjacent support actions.',
requiredAction: 'Connect and verify a Bitcoin wallet.',
repairRoute: '/terminal?auxillary-open-to=wallet',
repairRoute: '/packs?auxillary-open-to=wallet',
retryPolicy: 'after_repair',
}));
} else if (!input.walletBtdPaneState.signerPosture.ready) {
Expand All @@ -1521,7 +1521,7 @@ export function buildAuxillariesReadinessDiagnostics(input: {
severity: 'warning',
summary: 'Wallet binding exists but signer posture is not verified.',
requiredAction: input.walletBtdPaneState.signerPosture.requiredAction,
repairRoute: '/terminal?auxillary-open-to=wallet',
repairRoute: '/packs?auxillary-open-to=wallet',
retryPolicy: 'after_repair',
}));
}
Expand All @@ -1534,7 +1534,7 @@ export function buildAuxillariesReadinessDiagnostics(input: {
severity: 'warning',
summary: `${blockedInterface.interfaceId} is not admitted for the requested support surface.`,
requiredAction: blockedInterface.blockers.join(', ') || 'Review interface policy.',
repairRoute: '/terminal?auxillary-open-to=interfaces',
repairRoute: '/packs?auxillary-open-to=interfaces',
retryPolicy: 'after_repair',
}));
}
Expand All @@ -1546,7 +1546,7 @@ export function buildAuxillariesReadinessDiagnostics(input: {
severity: 'warning',
summary: 'Organization authority is not admitted for settlement-adjacent actions.',
requiredAction: 'Review organization role, grants, and wallet binding.',
repairRoute: '/terminal?auxillary-open-to=profile',
repairRoute: '/packs?auxillary-open-to=profile',
retryPolicy: 'after_repair',
}));
}
Expand Down Expand Up @@ -2048,7 +2048,7 @@ function buildProfileCompletenessIssue(input: {
const repairRoute: AuxillariesProfileRepairRoute = {
issueId: input.id,
pane: input.pane,
route: `/terminal?auxillary-open-to=${input.pane}`,
route: `/packs?auxillary-open-to=${input.pane}`,
label: input.label,
retryPolicy: 'after_repair',
};
Expand Down
2 changes: 1 addition & 1 deletion packages/context/src/context.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export declare function prepareContextForPrompt(context?: GlobalContext): {
branch: string;
commit: string;
task: string;
otfInstructions: any[] | undefined;
otfInstructions: any[];
};
Loading
Loading