Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@

## 0.3.20 - 2026-08-24

- Keep large generated Go/OpenAPI sources within bounded framework extraction
budgets, preserving zero-error qualification for complete enterprise graphs.

- Add Grounded Agent Graph overlays with citation-backed node, edge, Challenge,
and Retraction operations, immutable CAS-activated revisions, exact rebase,
historical composition, bounded audit, and read-only ingestion preparation.
Expand Down
68 changes: 64 additions & 4 deletions crates/compass-languages/src/frameworks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,24 @@ impl FrameworkPack {
dependency_markers: &'static [&'static str],
semantics_version: u32,
detector: SourceDetector,
) -> Self {
Self::source_versioned_with_limits(
id,
languages,
dependency_markers,
semantics_version,
FrameworkLimits::DEFAULT,
detector,
)
}

const fn source_versioned_with_limits(
id: &'static str,
languages: &'static [&'static str],
dependency_markers: &'static [&'static str],
semantics_version: u32,
limits: FrameworkLimits,
detector: SourceDetector,
) -> Self {
Self {
id,
Expand All @@ -136,7 +154,7 @@ impl FrameworkPack {
dependency_markers,
configuration_markers: &[],
manifest_policy: FrameworkManifestPolicy::Advisory,
limits: FrameworkLimits::DEFAULT,
limits,
adapter: FrameworkPackAdapter::Source(detector),
}
}
Expand Down Expand Up @@ -368,7 +386,20 @@ const FRAMEWORK_PACKS: &[FrameworkPack] = &[
FrameworkPack::source_versioned("python-web", &["python"], &[], 1, detect_python),
FrameworkPack::universal(&pack::PHP_FRAMEWORKS_DESCRIPTOR, php::detect),
FrameworkPack::universal(&pack::RAILS_RUBY_DESCRIPTOR, ruby::detect_universal),
FrameworkPack::source_versioned("go-web", &["go"], &[], 1, detect_go),
FrameworkPack::source_versioned_with_limits(
"go-web",
&["go"],
&[],
1,
FrameworkLimits {
// Generated OpenAPI Go files in the pinned qualification corpus
// exceed the shared 100k budget while remaining within the
// bounded parser-inspection ceiling.
max_syntax_nodes: 200_000,
..FrameworkLimits::DEFAULT
},
detect_go,
),
FrameworkPack::source_versioned("axum-web", &["rust"], &["axum"], 1, detect_axum),
FrameworkPack::source_versioned("rust-web", &["rust"], &[], 1, detect_rust),
FrameworkPack::universal(&pack::VAPOR_SWIFT_DESCRIPTOR, detect_swift_universal),
Expand Down Expand Up @@ -505,7 +536,13 @@ const FRAMEWORK_PACKS: &[FrameworkPack] = &[
dependency_markers: &[],
configuration_markers: &[],
manifest_policy: FrameworkManifestPolicy::Advisory,
limits: FrameworkLimits::DEFAULT,
limits: FrameworkLimits {
// Generated OpenAPI Go files can also activate the language-wide
// enterprise detector, which does not traverse syntax but still
// shares this pack-level preflight budget.
max_syntax_nodes: 200_000,
..FrameworkLimits::DEFAULT
},
adapter: FrameworkPackAdapter::Source(detect_enterprise),
},
FrameworkPack::config_versioned(
Expand Down Expand Up @@ -1074,7 +1111,7 @@ fn is_play_routes(path: &Path) -> bool {
mod tests {
use std::collections::HashSet;

use super::{FRAMEWORK_PACKS, FrameworkPackKind};
use super::{FRAMEWORK_PACKS, FrameworkLimits, FrameworkPackKind};

#[test]
fn framework_pack_registry_ids_are_unique_and_well_formed() {
Expand Down Expand Up @@ -1144,6 +1181,29 @@ mod tests {
}
}

#[test]
fn go_web_uses_explicit_budget_for_large_generated_sources() {
let go_web = FRAMEWORK_PACKS
.iter()
.find(|pack| pack.id == "go-web")
.expect("go-web framework pack");
assert_eq!(go_web.limits.max_syntax_nodes, 200_000);
assert_eq!(
FrameworkLimits::DEFAULT.max_syntax_nodes,
100_000,
"the expanded budget must not change the shared default"
);
}

#[test]
fn enterprise_domain_pack_matches_large_source_budget() {
let enterprise = FRAMEWORK_PACKS
.iter()
.find(|pack| pack.id == "enterprise-domain-facts")
.expect("enterprise-domain-facts framework pack");
assert_eq!(enterprise.limits.max_syntax_nodes, 200_000);
}

#[test]
fn react_router_dependency_is_owned_only_by_the_dedicated_route_pack() {
let owners = FRAMEWORK_PACKS
Expand Down
5 changes: 4 additions & 1 deletion crates/compass-languages/src/frameworks/typescript_syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ pub(crate) fn has_default_export_keyword(node: Node<'_>) -> bool {

pub(crate) const SYNTAX_VIEW_VERSION: &str = "compass.frontend-syntax/2";
pub(crate) const MAX_SYNTAX_DEPTH: usize = 256;
pub(crate) const MAX_SYNTAX_NODES: usize = 100_000;
/// Shared traversal ceiling. Individual framework packs may choose a lower
/// budget; the view must be able to distinguish those pack-level limits from
/// the hard parser-inspection ceiling.
pub(crate) const MAX_SYNTAX_NODES: usize = 200_000;
pub(crate) const MAX_STATIC_DEPTH: usize = 32;
pub(crate) const MAX_STATIC_ITEMS: usize = 2_048;
pub(crate) const MAX_STATIC_BYTES: usize = 64 * 1024;
Expand Down
Loading