Commit Graph
392 Commits
Author SHA1 Message Date
Time Attakc bfc92247e1 feat: optional code-intelligence provider contract (GBrain / Sourcebot / Graphify) (#16)
Optional code-intelligence provider contract (GBrain / Sourcebot / Graphify)
2026-07-21 18:20:12 -07:00
SinabinaandClaude Opus 4.8 ab7989c6c1 fix: correct adapters against real running providers (round 2)
Ran real backends in isolated environments (real Postgres-backed gbrain,
live Sourcebot v6.5.0 with anonymous access, real graphify 0.9.23). All three
now index + search end-to-end. Fixes:

- gbrain: RESTORE `--strategy code` in refresh — round 1 removed it on a --help
  misread, which silently stopped code from ever being indexed. refresh now runs
  the verified two-pass (`sync`, then `sync --strategy code --full`). Pinned by a
  new test so the regression can't return.
- sourcebot: an API key is NOT required for local use — anonymous access
  (FORCE_ENABLE_ANONYMOUS_ACCESS=true) serves /api/search keyless (verified). Key
  stays optional; only the messaging changed (anonymous-access first, key as
  fallback) plus a note that a local repo needs remote.origin.url to index.
- graphify: correct the docstring — for CODE both `graphify <dir>` and
  `graphify update` are AST-only (no LLM); the LLM only renames clusters and
  ingests non-code, which our parser ignores. No LLM mode; local=true is correct.

Docs: capability matrix + "Verified against real environments" updated to record
all three proven end-to-end and to correct the two first-round mistakes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 18:01:17 -07:00
SinabinaandClaude Opus 4.8 a524d860a8 docs: record real-environment verification and the fixes it drove
Update the capability matrix and provider notes to the verified real interfaces
(graphify update, Sourcebot v5 Bearer auth) and add a "Verified against real
environments" section documenting what the live tests found and fixed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 17:40:50 -07:00
SinabinaandClaude Opus 4.8 45310eee6e test: pin adapter tests to real captured tool output
Rewrite the Graphify and Sourcebot expectations against the real formats captured
from live tools (graphify NODE/EDGE query output; Sourcebot v5 response + Bearer
auth), add a gbrain engine-down -> PROVIDER_UNAVAILABLE degrade test and a
no-phantom-`--source` search assertion, and cover the persisted indexed-root path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 17:40:50 -07:00
SinabinaandClaude Opus 4.8 6686202be9 fix: persist indexed repo per provider and detect installs honestly
search was running in cwd and missing the repo you indexed. Persist the indexed
path per provider in the selection store and resolve it back so `search` reads
the same graph `index` built. Graphify availability now checks `graphify --version`
(installed = selectable) instead of "a graph already exists here", and the CLI
keys Graphify sources on the repo path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 17:40:50 -07:00
SinabinaandClaude Opus 4.8 f0f13998d8 fix: correct all three adapters to real tool interfaces (found by live testing)
Parallel real-environment tests (graphify 0.9.23, Sourcebot v5 in Docker,
gbrain 0.42.56) surfaced real mismatches:

- graphify: build via `graphify update <dir>` (the local, no-LLM path) instead
  of `graphify <dir>` (which runs an LLM backend needing a key + network, so the
  old path wasn't actually local); query via `graphify query --graph <graph.json>`
  so it reads the indexed graph regardless of cwd; parse the real NODE/EDGE output
  (file lives at src=/at=) instead of an invented format.
- sourcebot: Sourcebot v5 gates /api/search behind auth — send
  `Authorization: Bearer <SOURCEBOT_API_KEY>`; treat 401/403 as PROVIDER_UNAVAILABLE;
  make status probe /api/search without following the login redirect.
- gbrain: degrade engine/DB init failures (e.g. pglite WASM, garrytan/gbrain#223)
  to PROVIDER_UNAVAILABLE with a one-line message instead of PROVIDER_ERROR + a raw
  stack dump; drop flags the real CLI doesn't define (`sync --strategy`,
  `search --source`); align put/delete to stdin, export to brain-wide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 17:40:50 -07:00
SinabinaandClaude Opus 4.8 9650e8b056 test: cover the code-intelligence contract, adapters, selection, and consent
Capability matrix, result parsers, selection store + per-repo consent +
provider-OFF, egress gating, and each adapter end-to-end against a fake CLI
shim (gbrain, graphify) or injected fetch + temp config.json (sourcebot),
plus PROVIDER_UNAVAILABLE degrade for every provider. 19 tests, no live
tools required.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 17:16:54 -07:00
SinabinaandClaude Opus 4.8 f0091e0992 feat: gstack-code-intelligence CLI to select, index, and search
User-facing command tying the contract together: `options`/`status` show
providers with GBrain first and live availability, `select <provider>`
persists the choice, `consent [path]` records per-repo indexing consent,
`index [path]` registers + indexes the repo with the selected provider
(refusing non-local providers until consented), and `search <query>` runs a
query, degrading with a clear message when the provider is unavailable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 17:16:54 -07:00
SinabinaandClaude Opus 4.8 3eb4a1b23f feat: code-intelligence contract with real GBrain/Graphify/Sourcebot adapters
contract.ts: repo-oriented interface (four required ops, three optional),
typed CodeProviderError, egress + capability consent guards.

Three real, runtime-drivable adapters:
- GbrainProvider: gbrain CLI (reuses lib/gbrain-exec + lib/gbrain-sources),
  all seven capabilities.
- GraphifyProvider: graphify CLI — `graphify <dir>` builds the local graph,
  `graphify query` searches it, export reads graphify-out/graph.json. Fully
  local; never auto-installed.
- SourcebotProvider: self-hosted server over HTTP — register writes a local
  git connection to config.json, search is POST /api/search, status is a
  liveness probe. Loopback base URL = local (no egress); remote = consent.

selection.ts persists the chosen provider + per-repo indexing consent under
$GSTACK_HOME. picker.ts recommends GBrain first, resolves the selected
provider or null (provider-OFF), and probes live availability. Every adapter
degrades to PROVIDER_UNAVAILABLE when its tool/server is absent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 17:16:54 -07:00
SinabinaandClaude Opus 4.8 b4421a4e69 docs: design the repo-oriented code-intelligence provider contract
Design for the OPTIONAL code-intelligence provider contract that lets a
user pick how their codebase is indexed and searched, replacing gstack's
~17k LOC of bespoke GBrain glue. Repo-oriented ops (register_source/
refresh/search/status required; add/delete/export optional), a per-provider
capability matrix, GBrain-recommended-first selection, repo-scoped + install
consent, and a phased rollout that keeps gstack fully functional with no
provider selected. All three providers are driven from the runtime via CLI
or HTTP — no MCP client.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 17:16:53 -07:00
SinabinaandClaude Opus 4.8 38d2bb23a2 docs(changelog): mark codex/gstack-2 as the BLOCKED GStack 2 draft
Points readers to docs/gstack-2/STATUS.md as the authoritative completion
state. No VERSION bump or release claim while status is BLOCKED.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:52:08 -07:00
Sinabina 7f195615de Back model benchmark with Braintrust, drop in-house scoring (#13)
# Conflicts:
#	bun.lock
#	package.json
2026-07-21 14:45:13 -07:00
Time Attakc bab020dea9 feat(ios-qa): adaptive XCUITest QA — semantic tap, nested content (#14)
feat(ios-qa): adaptive XCUITest QA — reaches nested controls, verifies taps
2026-07-21 14:44:03 -07:00
Time Attakc 63c648516d feat(gstack2): consolidated runtime — execution-result contract, profiles, capability readiness, hardening (#10)
feat(gstack2): consolidated runtime — execution-result contract, profiles, capability readiness, hardening
2026-07-21 14:41:32 -07:00
SinabinaandClaude Opus 4.8 7f4574e1d5 refactor: capture plain-text CLI output, drop hardcoded provider schemas
The adapters parsed each vendor's proprietary JSON stream (Claude json,
Codex JSONL, Gemini stream-json) to extract tokens/tool-calls, and a
per-model pricing table turned tokens into cost. That coupling was the
brittle hardcoding GStack 2 exists to avoid — it broke every time a vendor
reshuffled its output, and it duplicated what any tool that instruments the
real model call already does. Braintrust owns scoring; it can't see a CLI
subprocess's tokens anyway, so computing cost ourselves meant maintaining
both a parser and a price table forever.

Now each adapter runs the CLI in plain-text mode and returns stdout. Scoring
is unchanged (Braintrust reads the text). RunResult drops tokens/toolCalls;
the comparison table drops the Tokens/Cost columns. Deletes pricing.ts, all
three JSON parsers, and the Gemini stream-schema parser + its test. Gemini
auth detection (env/OAuth/.env) is kept — that's not schema parsing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:34:57 -07:00
SinabinaandClaude Opus 4.8 c2ac1f32c0 feat(ios-qa): adaptive XCUITest runner that reaches nested controls and verifies taps
JSON-driven XCUITest runner plus SwiftUI/UIKit fixture apps that drive a
real app by bundle id. The runner resolves the actual switch inside a
SwiftUI Toggle wrapper, and when a center tap misses the full-width row it
retries on the control's trailing edge via an element-anchored normalized
offset (adaptive, not a raw screen coordinate), then verifies the switch
value actually changed. A tap that silently does nothing is now reported
as an interaction failure, not a false product defect. Validated on the
simulator and on a physical iPhone.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:19:14 -07:00
SinabinaandClaude Opus 4.8 466b1ec744 feat(ios-qa): add XCUITest execution-plan module
Standalone planner that turns the IOSQAFlow JSON contract into an
xcodebuild XCUITest invocation for simulator or physical device, using
semantic selectors (identifier/role/label) and no coordinate taps.
Pure plan generation; covered by 7 unit tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:19:14 -07:00
SinabinaandClaude Opus 4.8 52a6101706 fix(gstack2): treat hard runtime failure as not-ready in capability readiness
A capability whose binary launches while the managed runtime hard-fails
(e.g. skill-API mismatch) was reported as `degraded`/ok:true/exit 0, diverging
from plain `gstack doctor` (ok:false/exit 1) for the identical report. Split
the branch so runtime `warn` stays `degraded` and runtime `fail` maps to
`failed`, and add a regression test for the runtime-fail + capability-pass case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:12:54 -07:00
SinabinaandClaude Opus 4.8 36f972f2e4 feat: back model benchmark with Braintrust, drop in-house scoring
Braintrust now owns benchmark scoring, experiments, comparison, and
reporting. GStack keeps only the CLI-agent adapters (the unavoidable shim)
plus operational metrics the CLIs report. runProviderBenchmark wraps each
adapter as a Braintrust Eval task; a deterministic required-terms scorer
replaces the in-house evaluation logic and the optional autoevals ClosedQA
judge replaces judge.ts.

Runs local by default under bun: with no BRAINTRUST_API_KEY it sets
noSendLogs and ships nothing; setting the key opts into the cloud dashboard.
An empty output with zero tokens is thrown so a silent auth/CLI failure
can't masquerade as a 0.0 score.

Deletes runner.ts and judge.ts (and their test-helper re-export shims);
rewires bin/gstack-model-benchmark and adapts the benchmark tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:12:10 -07:00
SinabinaandClaude Opus 4.8 e71e7f7f41 fix: detect GEMINI_API_KEY/.env and parse current Gemini stream schema
The benchmark adapter only recognized GOOGLE_API_KEY and parsed the legacy
text/usage event shape. Recognize GEMINI_API_KEY and ~/.gemini/.env, parse
the current content/stats schema, ignore echoed user messages, and run
report-only plan mode with --skip-trust for disposable workspaces.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:11:51 -07:00
SinabinaandClaude Opus 4.8 571d0a72da docs: allow consent-gated external eval backends in GStack 2 contract
The contract previously named Context.dev the only authorized external
service and barred provider marketplaces. Loosen it so optional, off-by-
default, consent-gated eval backends (Braintrust and the like) are allowed;
keep the consent + typed-failure hygiene.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:11:45 -07:00
SinabinaandClaude Opus 4.8 313e8719f7 chore: add braintrust + autoevals as dev dependencies
Backing the model benchmark with Braintrust's local eval runner and its
autoevals scorer library instead of an in-house scoring engine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:11:39 -07:00
SinabinaandClaude Opus 4.8 d240b0fa6a fix(security): clear post-merge OSV advisories
New advisories landed after the integration work: fast-uri (High) and hono
(3x Medium) picked up fixed releases, and a Medium surfaced on
@hono/node-server. Bump the fast-uri and hono override pins to their fixed
patch releases (3.1.3, 4.12.27), clearing four findings.

The remaining @hono/node-server advisory is reachable only through the unused
@modelcontextprotocol/sdk transitive (no source imports it, no Hono server is
started); its only fix is a major bump the SDK pins against. Record that
assessment in .osv-scanner.toml so the scheduled scan stays honest instead of
alarming on an unreachable path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 13:38:13 -07:00
SinabinaandClaude Opus 4.8 cb1792fc58 Merge codex/gstack-2 into gstack2-runtime-integration
Reconcile the four integrated v2 runtime implementations (unified execution
result contract, execution profiles, capability readiness, GitHub security)
with main's browser-provider hardening.

Conflict resolutions:
- runtimeContract() generator: keep new execution-result + doctor-capability
  paragraphs, adopt main's `[matching browser flags]` fallback wording;
  regenerate the six RUNTIME.md.
- package.json: keep the strict isolated test:gstack2 runner and marked 18.0.6
  security bump; adopt main's playwright-core alias.
- bun.lock: regenerated via bun install.
- release-hardening.test.ts: adopt main's browser-provider assertions
  (resolveServerLaunchTarget, --browser managed smoke loop).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 13:15:03 -07:00
Sinabina 37144e8b05 fix(gstack2): harden integrated runtime verification 2026-07-21 12:29:01 -07:00
Sinabina a84a6e233d fix: harden browser provider activation 2026-07-21 12:13:33 -07:00
Sinabina e3effb3fc4 feat: require explicit browser provider consent 2026-07-21 12:07:01 -07:00
Sinabina 75b3576670 fix: use portable archive paths on Windows 2026-07-21 11:07:36 -07:00
Sinabina bec9b9bea4 fix: exclude Windows validator from runtime artifacts 2026-07-21 11:02:26 -07:00
Sinabina f7d44a4e5a fix: keep release smoke fixture inside project
Create the browser smoke page under GITHUB_WORKSPACE so the runtime's local-file trust boundary permits it on every runner, and advance the immutable bootstrap channel to RC3.
2026-07-21 10:43:57 -07:00
Sinabina dbf94804ad fix: make runtime release six-platform safe
Use an allowed local file URL for the browser smoke test, centralize keyless archive signing after native builds so Windows ARM64 does not require an unavailable Cosign binary, and advance the immutable bootstrap channel to RC2.
2026-07-20 16:58:31 -07:00
Sinabina b0047cc525 fix: add production runtime RC release channel
Publish signed prerelease artifacts from v2.0.0-rc.* tags, bind bootstrap trust to the immutable RC tag, make missing-release errors actionable, and install the six public skills from the canonical subpath.
2026-07-20 16:51:59 -07:00
Sinabina 09492d34b4 chore(security): harden GitHub workflows 2026-07-20 16:23:41 -07:00
Sinabina 2e1e52eae7 feat(gstack2): add capability readiness process 2026-07-20 16:23:38 -07:00
Sinabina a1b2b05a18 feat(gstack2): infer execution profiles 2026-07-20 16:22:43 -07:00
Sinabina 9b5ae4071d feat(gstack2): add unified execution result contract 2026-07-20 16:22:28 -07:00
Sinabina d6ef673e4d feat: add provider-aware browser QA setup
Detect host-native browser tools before offering the isolated local Chromium fallback, add a common readiness fixture, harden managed browser startup, and verify standards installs expose one canonical QA skill.
2026-07-20 16:01:24 -07:00
Sinabina f14445bb00 feat: componentize GStack 2 runtime and release integrity 2026-07-20 14:16:23 -07:00
Sinabina b0ea2296d1 record final cross-platform validation evidence 2026-07-17 14:56:54 -07:00
Sinabina a8a5fa1aa3 stabilize native Windows integration gates 2026-07-17 14:41:24 -07:00
Sinabina 6d3eb795e8 finish native Windows launcher validation 2026-07-17 14:29:16 -07:00
Sinabina b6e4ad5adb close Windows lock handoff races 2026-07-17 14:25:45 -07:00
Sinabina 9bb382f2ee stabilize runtime state on native Windows 2026-07-17 14:21:10 -07:00
Sinabina 9b3188e74b bound cross-platform runtime deadlines 2026-07-17 14:07:50 -07:00
Sinabina 2bc7775f89 make runtime provenance platform-neutral 2026-07-17 13:40:04 -07:00
Sinabina d0d770e811 stabilize generated iOS assets on Windows 2026-07-17 13:34:53 -07:00
Sinabina 39bc307b0c record host and cancellation evidence 2026-07-17 13:31:05 -07:00
Sinabina cb53351652 harden clean-host generation and shutdown 2026-07-17 13:30:19 -07:00
Sinabina c0f280dbf7 record live Context and device evidence 2026-07-17 12:43:53 -07:00
Sinabina 8b7c31d8a4 record committed-tree test totals 2026-07-17 12:21:08 -07:00