Repository navigation
Media cognition (projection substrate) + functional web-dev benchmark (#187/#123) - #1954
Merged
Merged
Conversation
…lamp media cognition The consumption half of the media substrate (#187). Two non-STOP-zone additions on top of the content-hash MediaFrame: - MediaFrame::description() + FrameDescriber trait — the sensory-bridge derivative, computed at most ONCE per content hash and Arc-shared. 13 personas needing the same image's description cost one describe call, not 13. Trait keeps media/ free of any cognition/ dep (live implementor is cognition::vision_describe; tests stub). - media/projection.rs — the ONE derive-not-clamp decision: project_image(frame, &caps, resolution, ..) selects which cached derivative a persona receives. Capability GATES (non-vision can never get pixels → bridged description); resolution KNOBS (Full = genuine full-res source, no thumbnail cap; Scaled = role/budget/adapter-max cell; Describe/Handle = summary/placeholder rungs). Every variant holds the SAME Arc the SharedCompute cache holds — selects, never recomputes or clamps. Both caps and compute threaded by reference. 9 new tests (description compute-once + fail-cached; projection matrix: non-vision gate, full zero-copy, scaled shared cell, forced-describe shares the one cell, handle placeholder, is_image_bytes). All 27 media tests green. Refs #187, [[perception-feedback-must-not-blow-rag]], [[media-is-compute-once-zero-copy-hardware-grade]] Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… what RENDERED (#123) Proves image-perception + code-dev in one benchmark, through the EXISTING eval grader (no parallel path). The scoring engine (perception::scoring::grade_ui) was already built + tested on canary; this wires it into cognition/eval: - EvalTask gains target/ui_checks/ui_pass_threshold (all serde-default → every existing gym parses unchanged). - perception_grade() in eval.rs: OBSERVES target through the persona's OWN identity-bearing executor (cycle.acting().executor → perception/observe → eye-node), deserializes ObserveResult, calls grade_ui. Purity: she is graded via the SAME eye-node path she sees her own work with — one dispatch path, mirrors the workspace-root seam exactly. No eye-node connected ⇒ fails loud, never a fake pass. - run_pass grader arm: !ui_checks.is_empty() ⇒ perception_grade (default target index.html, threshold 1.0 = 'it works'). - webdev-rs gym (6 tasks: login form, todo list, landing page, pricing cards, contact form, nav header) + EMBEDDED_GYMS entry + known_benchmarks row (Grader::Perception). Every model competes on equal footing — the structure tree is text a non-visual model reads exactly like a VLM. Boy-scout: EvalTask was a derive(TS) WITHOUT #[ts(export)], so its committed binding (imported by GenomeTeachParams/MinedTask/RedactMemoryParams) never regenerated and a new field silently rotted it (task #80 pathology). Gave it #[ts(export)] so the binding self-maintains; regenerated EvalTask.ts. 13 scoring+benchmark tests green (catalog test confirms webdev-rs resolves embedded). Refs #123, #187, [[dispatch-path-purity-and-load-harness]], [[built-to-teach-lesser-tuned-intelligences-win]] Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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.
What
Finishes the reusable media-cognition substrate (the consumption half of the media arc, #187) and lands a functional web-dev benchmark that proves image-perception + code-dev in one exam (#123) — through the existing eval path, no parallel dispatch.
Builds on the substrate merged in #1953 (
MediaFrame+perception::scoring).Part A — media cognition (non-STOP-zone substrate)
MediaFrame::description()+FrameDescribertrait — the sensory-bridge derivative, computed at most once per content hash andArc-shared. 13 personas needing the same image's description cost one describe call, not 13. The trait keepsmedia/free of anycognition/dep (live implementor will becognition::vision_describe; tests stub it).media/projection.rs— the ONE derive-not-clamp decision:project_image(frame, &caps, resolution, ..)selects which cached derivative a persona receives. Capability gates (non-vision can never get pixels → bridged description); resolution knobs (Full= genuine full-res source, no thumbnail cap;Scaled= role/budget/adapter-max cell;Describe/Handle= summary/placeholder rungs). Every variant holds the sameArctheSharedComputecache holds — it selects, never recomputes or clamps. Caps + compute threaded by reference.9 new tests. All 27 media tests green.
Part B — functional web-dev benchmark (STOP-zone, kept trivial)
The scoring engine (
perception::scoring::grade_ui) already existed + was tested on canary; this wires it intocognition/eval:EvalTaskgainstarget/ui_checks/ui_pass_threshold(all serde-default → every existing gym parses unchanged).perception_grade()— OBSERVEStargetthrough the persona's own identity-bearing executor (cycle.acting().executor→perception/observe→ eye-node), deserializesObserveResult, callsgrade_ui. Purity: she is graded via the same eye-node path she sees her own work with — one dispatch path, mirrors the workspace-root seam exactly. No eye-node connected ⇒ fails loud, never a fabricated pass.run_passgrader arm:!ui_checks.is_empty()⇒perception_grade(default targetindex.html, threshold 1.0 = "it works").webdev-rsgym (6 tasks: login form, todo list, landing page, pricing cards, contact form, nav header) +EMBEDDED_GYMSentry +known_benchmarksrow (Grader::Perception). Every model competes on equal footing — the structure tree is text a non-visual model reads exactly like a VLM.13 scoring + benchmark tests green (catalog test confirms
webdev-rsresolves embedded).Boy-scout:
EvalTaskwasderive(TS)without#[ts(export)], so its committed binding (imported byGenomeTeachParams/MinedTask/RedactMemoryParams) never regenerated and a new field silently rotted it (task #80 pathology). Gave it#[ts(export)]so the binding self-maintains; regeneratedEvalTask.ts.Why this is the right boundary
The live single-image render seam (
response.rs::build_messages_with_media) already does derive-not-clamp (native-vision → full bytes, no clamp; else → description). Routing it through the projection's async cells would force that sync hot-path function async + threadSharedCompute+describer — a STOP-zone rewrite whose real payoff is the multi-persona video wall (#168: N viewers × N streams, where scaled-cell + cross-persona dedup actually bite). Auto-describe-on-ingest (vision_describeis currently on-demand-only) is the same arc. Those are the next slice, deliberately not forced into a working hot path here.Validation
cargo test -p continuum-core --lib --features metal,accelerate media::→ 27 passedcargo test ... perception::scoring benchmark::→ 13 passedcargo check --libclean (only pre-existing unused-import warnings)Refs #187, #123, #29.
[[perception-feedback-must-not-blow-rag]],[[media-is-compute-once-zero-copy-hardware-grade]],[[dispatch-path-purity-and-load-harness]],[[built-to-teach-lesser-tuned-intelligences-win]]🤖 Generated with Claude Code