From 71e72c44ad677e692cf386e0948a25f1eb1dd0f1 Mon Sep 17 00:00:00 2001 From: choiyounggi <74581798+choiyounggi@users.noreply.github.com> Date: Mon, 28 Sep 2026 14:56:07 +0900 Subject: [PATCH] knowledge: ingest 1 verified insight (maps-compose marker state from changing position) --- .dev-loop/INGEST_REPORT.md | 183 +++++------------- INDEX.md | 2 +- log.md | 2 + wiki/mobile/index.md | 9 +- .../lifecycle/process-death-and-state.md | 2 +- ...map-marker-state-from-changing-position.md | 83 ++++++++ 6 files changed, 144 insertions(+), 137 deletions(-) create mode 100644 wiki/mobile/state/map-marker-state-from-changing-position.md diff --git a/.dev-loop/INGEST_REPORT.md b/.dev-loop/INGEST_REPORT.md index 939e9fb..f3851ae 100644 --- a/.dev-loop/INGEST_REPORT.md +++ b/.dev-loop/INGEST_REPORT.md @@ -1,149 +1,64 @@ -# Knowledge ingest — WebMCP as the development standard: 2 pages re-verified, 2 new pages, routing widened +# Knowledge flush — 1 insight (19 claimed rows: 1 ingested, 18 plan-gap rows retired as local-layer) -Trigger: a Korean WebMCP explainer video (2026-09) pasted for evaluation. Its own content -(declarative vs imperative API, shared page logic, token savings vs browser agents) was already -covered by the two pages ingested 2026-08-18; adoption advocacy and proposal history were again -left out. Verifying the video's claims against primary sources found the wiki a month behind its -sources; the owner then decided (2026-09-28) that the additive WebMCP tool layer is the -development standard for web UI work, QA, and bug fixes, which changes routing. +Run id `20260928-144949-57122` (inherited from the auto-flush parent via `DEV_LOOP_FLUSH_RUN_ID`; `flush-lock.sh acquire` answered `already-owned`). Claimed ids: `097a257377078016` (session row, ingested) plus 18 `plan-gaps.jsonl` rows listed under Local-layer candidates. ## Verified best-practice -### 1. `consequentialHint` / `debugging` annotations, ChatGPT site-tools constraints, DevTools pane → **verified** - -- https://webmachinelearning.github.io/webmcp/ — Draft Community Group Report dated 2026-09-26; - IDL `partial interface Document { readonly attribute ModelContext modelContext }` (Document - only); `dictionary ToolAnnotations { readOnlyHint, untrustedContentHint, consequentialHint, - debugging }`; no user-confirmation primitive defined. (fetched 2026-09-28) -- https://developer.chrome.com/docs/ai/webmcp/imperative-api — page dated 2026-09-21; - `document.modelContext.registerTool({ name, description, inputSchema, execute, annotations }, - { signal, exposedTo })`; `consequentialHint` "allows agents and browsers to enforce mandatory - user confirmation prompts before executing high-stakes tools"; `debugging` Chrome 156+; no - `requestUserInteraction` mention (the security page's old note on it was removed). -- https://developer.chrome.com/docs/devtools/application/webmcp — page dated 2026-05-12; the - WebMCP pane is in the Application panel; Available Tools (name, description, invocation count), - Invoked Tools (status, input, output), Run tool with manual parameters, schema-mismatch errors - in the output pane. -- https://learn.chatgpt.com/docs/webmcp — "Site tools are ChatGPT's implementation of the - proposed WebMCP standard"; feature-detects `document.modelContext.registerTool`; declarative - API and iframe registrations unsupported; "Each tool invocation receives a safety review before - it runs"; GPT-5.6 Sol / GPT-6 Sol only, Luna disabled; desktop app; not in Enterprise/Edu; - surfaces: built-in browser, ChatGPT Work, Codex; user toggle under Settings → Browser → - Permissions. (help.openai.com's site-tools article was dropped as a source: it returns 403 to - fetchers, so its claims could not be verified.) -- https://developer.chrome.com/docs/ai/webmcp/secure-tools — page dated 2026-09-01; budgets - 30 / 500 / 150 / 1.5K. Contains no auth-state guidance, so the parity gate's both-auth-states - row is derived from security-agent-exposure-in-session-tool-exposure (PII via read tools, - server-side authz unchanged), not from this page. -- https://developer.chrome.com/docs/ai/webmcp — page dated 2026-08-07; origin trial from Chrome - 149; Model Context Tool Inspector extension; prompts go to `gemini-3-flash-preview`. - -### 2. WebMCP-as-standard routing (owner decision) → **policy, not a sourced claim** - -The widened triggers (any new or changed user action in a web UI) and the parity gate's -"every action has a tool unless on the exclusion list" are the owner's development standard, -stated as such in log.md. Every mechanical directive inside those pages is sourced as above. -The standard keeps the existing "human UI primary, tool layer additive" directive unchanged. +**Claim (row `097a257377078016`, repo t6a-trip-ui / dace):** when a maps-compose `Marker`'s position comes from changing state, build it with `rememberUpdatedMarkerState(position)` inside `key(item.id) { … }`; keep the `rememberSaveable`-based constructor only for a marker whose start point never moves. Mechanism: `rememberMarkerState` is `rememberSaveable { MarkerState(position) }`, so the argument is only the initial value; remembered state is positional, so a changed list hands one item another item's state. -## Existing-layer check +Sources checked and how: + +- `maps-compose/src/main/java/com/google/maps/android/compose/Marker.kt` on `main` (raw fetch, 2026-09-28): `rememberMarkerState` = `rememberSaveable(key = key, saver = MarkerState.Saver) { MarkerState(position) }`, annotated `@Deprecated("Use 'rememberUpdatedMarkerState' instead - It may be confusing to think that the state is automatically updated as the position changes, so it will be changed or removed.")`; `rememberUpdatedMarkerState` = `remember { MarkerState(position = position) }.also { it.position = position }`; `MarkerState.position` is `mutableStateOf`. Also `dragState` is itself deprecated in favour of `isDragging` (line 108–113), so the page cites `isDragging`. +- Same file at tag `v6.6.0` (the version the session pinned), lines 195–225 re-read via `curl … | sed -n '195,225p'`: identical definitions and the same `@Deprecated`, confirming the row's `Marker.kt:203-221` citation. +- API reference pages (both fetched, both exist): `remember-updated-marker-state.html` — "updates the state value according to the update of the input parameter, like 'rememberUpdatedState'. This cannot be used to preserve state across configuration changes"; `remember-marker-state.html` — "this function does not automatically update the MarkerState when the input parameters change" plus the deprecation notice. +- Version boundary: PR #638 (merged 2025-01-29, merge commit `0d6f023`) introduced the deprecation and `rememberUpdatedMarkerState`. `gh api repos/googlemaps/android-maps-compose/compare/...0d6f023` gives `ahead` for v6.4.1/v6.4.2 and `behind` for v6.4.3/v6.4.4/v6.5.0, so **v6.4.3** is the first release containing it. PR #730 (merged 2025-08-06, "bring rememberMarkerState back … The function is still deprecated") is `behind` v6.7.1 and `ahead` of v6.7.0, so the function was absent in 6.7.0 and restored in 6.7.1. +- `https://developer.android.com/develop/ui/compose/lifecycle` (fetched): "When calling a composable multiple times from the same call site, Compose doesn't have any information to uniquely identify each call … the execution order is used in addition to the call site"; the `key` composable and `LazyColumn` `items(key = …)` are the documented remedy. +- Current README (`maps-compose:8.6.0`) uses `rememberUpdatedMarkerState` in its own MarkerState example. -Pages read: frontend-agent-interfaces-agent-facing-tool-surfaces, security-agent-exposure-in-session-tool-exposure, qa-process-release-gates, testing-strategy-differential-testing, testing-strategy-cross-layer-effect-tests, testing-strategy-failing-test-first +Result: **confidence: verified** (official source + API docs + Android docs + reproducible compare-API check). One edge case (a draggable marker under a re-assigned position is reset on each composition) is derived from the `.also { it.position = position }` source line, not from an external doc, and the page says so by quoting the mechanism. -Whole-wiki grep `webmcp|modelContext|toolname|agent-friendly|answer engine` → 7 files (the two -WebMCP pages, their two domain indexes, INDEX.md, log.md, platforms/tools/plugin-mcp-server- -registration which matches only on a modelcontextprotocol URL). skills/, hooks/, agents/, -templates/, AGENTS.md → 0 mentions. qa/testing/debugging indexes → no WebMCP routing line (the -one qa hit is the model-coupled-guidance-aging-detector page, unrelated). `wiki_search` was -unavailable (dev-loop-wiki MCP server failed to connect this session); the category pages were -read directly per the skill's fallback. +## Existing-layer check -Merge targets: both existing WebMCP pages were **revised in place** (same trigger, same -directive, newer sources) — no new page for that material. The two new pages have new triggers -(a release gate; a test strategy) that no existing qa/testing page covers: release-gates is the -generic checklist page and is linked, not extended; differential-testing / cross-layer-effect- -tests / failing-test-first are referenced from the testing page's edge cases. +Pages read: mobile-lifecycle-process-death-and-state, mobile-presentation-gating-nested-sheet-presentation -Related links added both ways: qa-process-release-gates ↔ qa-process-agent-tool-parity-gate; -testing-strategy-cross-layer-effect-tests ↔ testing-strategy-agent-tool-shared-handler-tests; -frontend agent-facing-tool-surfaces and security in-session-tool-exposure ↔ both new pages. +- `INDEX.md` → mobile domain (app-side Android). `wiki/mobile/index.md` read in full: categories lifecycle / offline / networking / release / performance / navigation / presentation / permissions / security; no "load when" line overlaps a Compose map marker or in-composition state identity. +- `grep -rli 'maps-compose|rememberMarkerState|google maps' wiki/` → 0 hits; `grep -rli 'rememberSaveable|positional memoization|stable key|key('` → only `mobile/lifecycle/process-death-and-state.md` (mentions `rememberSaveable` as a saved-state mechanism) plus two unrelated pages (suppression-key, spec-artifact-checks). +- `wiki_search` (k=5) on the trigger sentence returned qa-environments-element-crop-screenshots, platforms-processes-driving-a-tui-in-a-tmux-pane, infrastructure-agent-orchestration-pane-delivery-confirmation, frontend-design-responsive-layout, qa-document-verification-retiring-a-provisional-marker — all lexical "marker/position" matches, none the same situation. No merge target → **new page**. +- No conflict: process-death-and-state says "use `rememberSaveable` for transient UI state"; the new page's configuration-change edge case defers to it (hoist to `ViewModel`/`SavedStateHandle`, then pass in). Related link added **both ways** (process-death-and-state `related:` gained the new id; no open PR touches `wiki/mobile/`, so the back-link is safe). ## Open-PR check -`gh pr list --state open` (2026-09-28): one open PR, #223 (knowledge/choiyounggi-20260927-220735, -15 insights). Its file list contains none of the four WebMCP-related pages; the only overlap is -appended log.md entries (union merge). +`gh pr list --repo choiyounggi/dev-loop --state open --search "head:knowledge/"` → #223 (`knowledge/choiyounggi-20260927-220735`), #225 (`…-20260928-082803`), #226 (`…-092831`), #227 (`…-103056`), #228 (`…-134840`). Each head fetched; `git diff --name-only origin/main origin/ -- wiki/ INDEX.md` and a grep of each diff for `maps-compose|MarkerState|jetpack compose|remember(|rememberSaveable|key(` → 0 hits in all five. None touches `wiki/mobile/**`; #223/#225/#227 edit `INDEX.md` but not the `[mobile]` row (checked per PR with `grep '^[-+].*\[mobile\]'` → no lines). + +Verdict per candidate: `097a257377078016` → **new**. The 18 plan-gap rows are local-layer drops (below), so no open-PR overlap applies to them. ## Routing decision -- frontend/agent-interfaces/agent-facing-tool-surfaces — revised (owning artifact: the UI code). -- security/agent-exposure/in-session-tool-exposure — revised (confirmation gating). -- **qa/process/agent-tool-parity-gate** — new page in the existing `process` category beside - release-gates: it is a release-decision checklist for one surface, so it belongs where - release-gates and regression-scope live; no new category. -- **testing/strategy/agent-tool-shared-handler-tests** — new page in the existing `strategy` - category beside test-level-choice / cross-layer-effect-tests: it decides what to test and at - which level for a two-entry-point action; no new category. -- AGENTS.md routing step 7 — one row added (web UI user action → frontend agent-interfaces, - then the qa parity gate); tests/review-routing.bats pin 6 → 7 rows in the same commit. -- INDEX.md frontend / qa / testing route lines and the three domain indexes updated; log.md - gained two ingest entries and two revise entries. - -## Verification - -- `node scripts/wiki-lint-prohibitions.js wiki` → directives 79, violations 0 (pin unchanged). -- `node scripts/wiki-structure-checks.js wiki --layer bundled` → pages 353, findings 0. -- bats: tests/wiki-*.bats + tests/review-routing.bats + tests/orchestrate-review-pass.bats → - 273/273 ok (one earlier `Recall@5` flake re-ran green; baseline on an untouched HEAD worktree - measured the same 0.87). -- Body lines: frontend 110, security 76, qa 70, testing 66 (limit 120). - -## Independent review (before commit) - -- General reviewer (feature-dev:code-reviewer, fresh context): FAIL → 2 major + 4 minor, all - applied: `consequentialHint` scope aligned with the security page's class table; gate edge row - for a vanished runtime (human-UI release not blocked); logout added to the AbortSignal edge - row and the Registration test; step 2/3 of the testing page conditioned on imperative vs - declarative; AGENTS.md step-7 row admits the exclusion list; qa index clause matched to the - page trigger. -- Adversarial fact-checker (fresh context, every source re-fetched): 8/8 targeted claims - confirmed; FAIL on 2 unsupported sentences + 8 imprecisions, all applied: dropped the - `navigator.modelContext` history (no cited source has it); Run tool no longer claimed to write - Invoked Tools (that log is agent↔page); `consequentialHint` quote re-attributed (draft: "client - or agent"; Chrome: "agents and browsers"); secure-tools' stale `requestUserInteraction()` - mention recorded; `readOnlyHint` "requested" → "in its read-only example"; budgets labelled - as Chrome's recommendations applied as limits, parameter names included; cross-origin edge - row now names `allow="tools"` + `exposedTo` + `getTools({ fromOrigins })`; origin trial and - local flag separated; `SubmitEvent.agentInvoked` / `respondWith()` added to the declarative - test directive. - -## CI agent gate (run 36329841491) — blocker refuted, advisories applied - -- Blocker claimed the CG draft has no "client or agent … selectively enforce" language. Ground - truth (`curl -sL https://webmachinelearning.github.io/webmcp/`, 504,537 bytes, tags stripped, - 2026-09-28): the phrase occurs once, in §6 Security considerations under the mitigation for - "Misrepresentation of Intent": "A boolean consequentialHint annotation acts as a signal to the - client or agent that the tool performs a consequential action … This way they can selectively - enforce mandatory user confirmation prompts before executing high-stakes tools". The gate's - fetch read a truncated page. The page now names the section beside the quote. -- Advisory (chromestatus unverifiable from CI): confirmed via the JSON API — stage 150 - desktop/Android 149–156; Firefox and Safari "No signal". The source line now records the API - path. -- Advisory (Run tool vs Invoked Tools): Do 8 no longer implies manual runs are excluded from the - log; it states only what the DevTools page states. -- Advisory (cross-link gap): qa parity gate ↔ backend-common-api-design-agent-tool-granularity - linked both ways, with one sentence placing the parity table as the release-time reading of - that page's design-time capability map. - -## CI agent gate, second run (36330523418) — blocker applied, quote advisory stands - -- Blocker: the frontend page stated "the development standard is an additive WebMCP tool per - action" as unconditional fact under confidence: verified. Applied: the trigger, the frontend - domain description and load-when line, and the INDEX.md frontend row now condition on "this - wiki's development standard (owner decision, log.md 2026-09-28, a policy rather than a sourced - fact)". Routing width is unchanged; the sentence is a policy the wiki declares, not a claim about - the world. -- Advisory (§6 quote unverifiable from CI): the gate's fetch truncates before §6.3.2 and curl is - blocked in its sandbox; it records the quote as unverifiable, not refuted. Ground-truth grep is in - the PR comment; the two sources lines name the section. -- Advisory (duplication with test-level-choice's extract-and-wire edge row): linked both ways and - named in step 1 as the general rule applied to two entry points. +- `097a257377078016` → `wiki/mobile/state/map-marker-state-from-changing-position.md` (id `mobile-state-map-marker-state-from-changing-position`, `applies_to: [android, jetpack-compose]`, 67 body lines). +- **New category `mobile/state`** — "in-composition UI state identity". Why the existing ones don't fit: `lifecycle` is state *survival* across process death/config change (where each kind of state lives); this page is about which remembered instance a running composition binds to and whether a parameter is read once or on every composition. `presentation` is modal hosting. `frontend/state` is web UI. The new category's index row and the mobile "Route here for" paragraph name it, and the root `INDEX.md` mobile route line was widened with "a Compose map marker whose position comes from changing state". +- Plumbing: `wiki/mobile/index.md` (+`## state` section), `INDEX.md` (mobile row), `log.md` (ingest entry), `wiki/mobile/lifecycle/process-death-and-state.md` (reciprocal `related:`). + +## Local-layer candidates + +All 18 `plan-gaps.jsonl` rows are wiki-plan "no owning wiki page" design records whose directives name one repository's own files, RFC numbers, test lines or signatures; each would be wrong in another codebase. Retired as handled; run `wiki-ingest` inside the owning project if any is wanted there. + +seagrass (linkly), task t172-money-set-and-guards — target `wiki-local/backend/python/.md` in that repo: +- `f8274e8a574a39af` `_check_dimensions` message names RFC-0051 only when `"money"` participates → `money-mismatch-message-cites-rfc-0051` +- `ff968018e51af793` `interp.eval_value` `Ref` branch gains a Money dict case (shape dispatch) → `money-runtime-shape-dispatch` +- `f541156192eeee35` `money.py` `sub`/`mul_int` pure, import-free, own ±INT64 check → `money-sub-mul-int-domain-check` +- `4bac29ffc7930e3c` `_condition_holds` spec-only Money order comparison opened → `money-order-comparison-in-spec` +- `72355943be4f08f4` RFC-0051 status Draft + Updates chain per RFC-0007 §2.2 → `wiki-local/qa/document-verification/rfc-0051-updates-chain` +- `4d2a12cfb4602426` and `1958e49958fa5319` (identical text, two harvests) t177 declared-field rule reaches `_dimension_of` through the generic reference loop → `numeric-predicate-declared-field-rule` +- `cae239f03ddab2cd` `RFC_ROUTES["0051"]`, generated grammar prose, README/CHANGELOG/ENFORCEMENT rows → `rfc-0051-registry-rows` + +dace (linkly-calendar), task t6a-trip-ui — target `wiki-local/mobile//.md` in `apps/android`: +- `7068f2146ea1e6b9` `GoogleMapsKeyResolver.isValidKey`/`readManifestKey` empty-key gate → `maps/google-maps-key-gate` +- `3042cba1f8844f84` `TripTabRoot` receives a constructed `TripViewModel` → `navigation/trip-tab-root-viewmodel-injection` +- `d771e774c84744e2` `OPTIMIZE_APPLY_FAILED_MESSAGE` constant and local message state → `presentation/optimize-apply-failed-message` +- `c3868b8e8b2fab3b` `moveItem`/`deleteItem` pure list functions in `TripItineraryEdit.kt` → `state/itinerary-move-delete-pure-functions` +- `772f3a2a727f3cfe` `tripDatesInRange`/`tripShortDisplay` on `java.time.LocalDate` → `state/trip-date-chip-pure-functions` +- `07729881a03fce5f` category markers via `MarkerComposable` badge (6.6.0) → `maps/category-marker-composable` +- `25c323dfe8e9f66c` hand-rolled `decodePolyline` in `TripMap.kt` → `maps/encoded-polyline-decoder` +- `8979225a66711966` pinned maps-compose 6.6.0 / play-services-maps 20.0.0 verified from Gradle module metadata → `maps/pinned-maps-versions` +- `eef21f20e6149557` `MapStyle` object loading `res/raw/map_style_light.json` and parse-failure behaviour → `maps/map-style-json-loading` +- `081eb80b1695e007` `.orchestration-notes/t6a-trip-ui.md` public-signature record → `wiki-local/infrastructure/agent-orchestration/t6a-orchestration-notes` diff --git a/INDEX.md b/INDEX.md index e947472..6659adf 100644 --- a/INDEX.md +++ b/INDEX.md @@ -20,6 +20,6 @@ follow the cross-pointers in their index or take the next matching seeded domain | [debugging](wiki/debugging/index.md) | **seeded** | Diagnosing a failure — finding what is wrong and why: reproducing, bisection, hypothesis testing, traces/logs, intermittent failures (fixing the diagnosed fault → its owning domain) | | [security](wiki/security/index.md) | **seeded** | Trust-boundary decisions: input validation, session-vs-token auth choice, per-resource authorization (IDOR), secrets hygiene (including ciphertext orphaned by a regenerated encryption key), dependency trust, PII handling, in-session agent tool exposure (prompt-injection blast radius), the author identity a commit publishes to a public repository, host-compromise triage / incident response (verifying assumed security agents, identifying masquerading processes) (XSS rendering → frontend; CI secrets → infrastructure; JWT implementation → backend/frontend auth) | | [platforms](wiki/platforms/index.md) | **seeded** | OS-level differences breaking code across macOS/Linux/Windows: shell portability, BSD-vs-GNU CLI, filesystem case/line endings, Unicode normalization in text/file-name matching, commands inspected before execution, permission deny rules for bypass-mode agent workers, background services/cron, invoking prompt-capable CLIs non-interactively, toolchain version pinning | -| [mobile](wiki/mobile/index.md) | **seeded** | App-side iOS/Android/cross-platform: process death/state survival, offline-first sync, mobile-network calls, store rollout/hotfix strategy, startup time, modal presentation (several sheets/covers on one host, screen-level error sheets) | +| [mobile](wiki/mobile/index.md) | **seeded** | App-side iOS/Android/cross-platform: process death/state survival, offline-first sync, mobile-network calls, store rollout/hotfix strategy, startup time, modal presentation (several sheets/covers on one host, screen-level error sheets), a Compose map marker whose position comes from changing state | All ten domains are seeded. New categories grow via `skills/wiki-ingest/SKILL.md`. diff --git a/log.md b/log.md index 72b6053..6bb884c 100644 --- a/log.md +++ b/log.md @@ -208,3 +208,5 @@ Append-only. Format: `## [YYYY-MM-DD]