@backthread/extractor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/cluster/domain-grouping.d.ts +113 -0
- package/dist/cluster/domain-grouping.d.ts.map +1 -0
- package/dist/cluster/domain-grouping.js +277 -0
- package/dist/cluster/domain-grouping.js.map +1 -0
- package/dist/cluster/grouping-gate.d.ts +54 -0
- package/dist/cluster/grouping-gate.d.ts.map +1 -0
- package/dist/cluster/grouping-gate.js +0 -0
- package/dist/cluster/grouping-gate.js.map +1 -0
- package/dist/cluster/louvain.d.ts +88 -0
- package/dist/cluster/louvain.d.ts.map +1 -0
- package/dist/cluster/louvain.js +674 -0
- package/dist/cluster/louvain.js.map +1 -0
- package/dist/cluster/overrides.d.ts +19 -0
- package/dist/cluster/overrides.d.ts.map +1 -0
- package/dist/cluster/overrides.js +32 -0
- package/dist/cluster/overrides.js.map +1 -0
- package/dist/cluster/subsystem.d.ts +45 -0
- package/dist/cluster/subsystem.d.ts.map +1 -0
- package/dist/cluster/subsystem.js +299 -0
- package/dist/cluster/subsystem.js.map +1 -0
- package/dist/cluster/workspaces.d.ts +64 -0
- package/dist/cluster/workspaces.d.ts.map +1 -0
- package/dist/cluster/workspaces.js +739 -0
- package/dist/cluster/workspaces.js.map +1 -0
- package/dist/extract.d.ts +52 -0
- package/dist/extract.d.ts.map +1 -0
- package/dist/extract.js +48 -0
- package/dist/extract.js.map +1 -0
- package/dist/framework/celery/celery.d.ts +17 -0
- package/dist/framework/celery/celery.d.ts.map +1 -0
- package/dist/framework/celery/celery.js +524 -0
- package/dist/framework/celery/celery.js.map +1 -0
- package/dist/framework/contribute-step.d.ts +38 -0
- package/dist/framework/contribute-step.d.ts.map +1 -0
- package/dist/framework/contribute-step.js +403 -0
- package/dist/framework/contribute-step.js.map +1 -0
- package/dist/framework/detect-step.d.ts +8 -0
- package/dist/framework/detect-step.d.ts.map +1 -0
- package/dist/framework/detect-step.js +54 -0
- package/dist/framework/detect-step.js.map +1 -0
- package/dist/framework/detect-util.d.ts +24 -0
- package/dist/framework/detect-util.d.ts.map +1 -0
- package/dist/framework/detect-util.js +59 -0
- package/dist/framework/detect-util.js.map +1 -0
- package/dist/framework/django/django.d.ts +22 -0
- package/dist/framework/django/django.d.ts.map +1 -0
- package/dist/framework/django/django.js +940 -0
- package/dist/framework/django/django.js.map +1 -0
- package/dist/framework/fastapi/fastapi.d.ts +27 -0
- package/dist/framework/fastapi/fastapi.d.ts.map +1 -0
- package/dist/framework/fastapi/fastapi.js +477 -0
- package/dist/framework/fastapi/fastapi.js.map +1 -0
- package/dist/framework/faststream/faststream.d.ts +19 -0
- package/dist/framework/faststream/faststream.d.ts.map +1 -0
- package/dist/framework/faststream/faststream.js +765 -0
- package/dist/framework/faststream/faststream.js.map +1 -0
- package/dist/framework/flask/flask.d.ts +17 -0
- package/dist/framework/flask/flask.d.ts.map +1 -0
- package/dist/framework/flask/flask.js +507 -0
- package/dist/framework/flask/flask.js.map +1 -0
- package/dist/framework/graphql/graphql.d.ts +17 -0
- package/dist/framework/graphql/graphql.d.ts.map +1 -0
- package/dist/framework/graphql/graphql.js +708 -0
- package/dist/framework/graphql/graphql.js.map +1 -0
- package/dist/framework/grpc/grpc.d.ts +22 -0
- package/dist/framework/grpc/grpc.d.ts.map +1 -0
- package/dist/framework/grpc/grpc.js +618 -0
- package/dist/framework/grpc/grpc.js.map +1 -0
- package/dist/framework/litestar/litestar.d.ts +17 -0
- package/dist/framework/litestar/litestar.d.ts.map +1 -0
- package/dist/framework/litestar/litestar.js +536 -0
- package/dist/framework/litestar/litestar.js.map +1 -0
- package/dist/framework/nest/nest.d.ts +19 -0
- package/dist/framework/nest/nest.d.ts.map +1 -0
- package/dist/framework/nest/nest.js +613 -0
- package/dist/framework/nest/nest.js.map +1 -0
- package/dist/framework/next/next.d.ts +22 -0
- package/dist/framework/next/next.d.ts.map +1 -0
- package/dist/framework/next/next.js +449 -0
- package/dist/framework/next/next.js.map +1 -0
- package/dist/framework/node/node.d.ts +24 -0
- package/dist/framework/node/node.d.ts.map +1 -0
- package/dist/framework/node/node.js +1009 -0
- package/dist/framework/node/node.js.map +1 -0
- package/dist/framework/orchestrator/orchestrator.d.ts +34 -0
- package/dist/framework/orchestrator/orchestrator.d.ts.map +1 -0
- package/dist/framework/orchestrator/orchestrator.js +691 -0
- package/dist/framework/orchestrator/orchestrator.js.map +1 -0
- package/dist/framework/orm/orm.d.ts +61 -0
- package/dist/framework/orm/orm.d.ts.map +1 -0
- package/dist/framework/orm/orm.js +620 -0
- package/dist/framework/orm/orm.js.map +1 -0
- package/dist/framework/python/analyze.d.ts +38 -0
- package/dist/framework/python/analyze.d.ts.map +1 -0
- package/dist/framework/python/analyze.js +98 -0
- package/dist/framework/python/analyze.js.map +1 -0
- package/dist/framework/python/py-ast.d.ts +130 -0
- package/dist/framework/python/py-ast.d.ts.map +1 -0
- package/dist/framework/python/py-ast.js +344 -0
- package/dist/framework/python/py-ast.js.map +1 -0
- package/dist/framework/python-orm/python-orm.d.ts +19 -0
- package/dist/framework/python-orm/python-orm.d.ts.map +1 -0
- package/dist/framework/python-orm/python-orm.js +516 -0
- package/dist/framework/python-orm/python-orm.js.map +1 -0
- package/dist/framework/react-native/react-native.d.ts +35 -0
- package/dist/framework/react-native/react-native.d.ts.map +1 -0
- package/dist/framework/react-native/react-native.js +1181 -0
- package/dist/framework/react-native/react-native.js.map +1 -0
- package/dist/framework/register.d.ts +2 -0
- package/dist/framework/register.d.ts.map +1 -0
- package/dist/framework/register.js +59 -0
- package/dist/framework/register.js.map +1 -0
- package/dist/framework/registry.d.ts +31 -0
- package/dist/framework/registry.d.ts.map +1 -0
- package/dist/framework/registry.js +70 -0
- package/dist/framework/registry.js.map +1 -0
- package/dist/framework/routing/expo-router.d.ts +31 -0
- package/dist/framework/routing/expo-router.d.ts.map +1 -0
- package/dist/framework/routing/expo-router.js +356 -0
- package/dist/framework/routing/expo-router.js.map +1 -0
- package/dist/framework/routing/index.d.ts +4 -0
- package/dist/framework/routing/index.d.ts.map +1 -0
- package/dist/framework/routing/index.js +16 -0
- package/dist/framework/routing/index.js.map +1 -0
- package/dist/framework/routing/next-router.d.ts +45 -0
- package/dist/framework/routing/next-router.d.ts.map +1 -0
- package/dist/framework/routing/next-router.js +378 -0
- package/dist/framework/routing/next-router.js.map +1 -0
- package/dist/framework/routing/route-tree.d.ts +73 -0
- package/dist/framework/routing/route-tree.d.ts.map +1 -0
- package/dist/framework/routing/route-tree.js +120 -0
- package/dist/framework/routing/route-tree.js.map +1 -0
- package/dist/framework/types.d.ts +230 -0
- package/dist/framework/types.d.ts.map +1 -0
- package/dist/framework/types.js +25 -0
- package/dist/framework/types.js.map +1 -0
- package/dist/graph/cross-language.d.ts +11 -0
- package/dist/graph/cross-language.d.ts.map +1 -0
- package/dist/graph/cross-language.js +123 -0
- package/dist/graph/cross-language.js.map +1 -0
- package/dist/graph/extract.d.ts +13 -0
- package/dist/graph/extract.d.ts.map +1 -0
- package/dist/graph/extract.js +79 -0
- package/dist/graph/extract.js.map +1 -0
- package/dist/graph/file-graph.d.ts +186 -0
- package/dist/graph/file-graph.d.ts.map +1 -0
- package/dist/graph/file-graph.js +427 -0
- package/dist/graph/file-graph.js.map +1 -0
- package/dist/graph/http-callsites.d.ts +14 -0
- package/dist/graph/http-callsites.d.ts.map +1 -0
- package/dist/graph/http-callsites.js +107 -0
- package/dist/graph/http-callsites.js.map +1 -0
- package/dist/graph/incremental.d.ts +122 -0
- package/dist/graph/incremental.d.ts.map +1 -0
- package/dist/graph/incremental.js +448 -0
- package/dist/graph/incremental.js.map +1 -0
- package/dist/graph/language.d.ts +31 -0
- package/dist/graph/language.d.ts.map +1 -0
- package/dist/graph/language.js +146 -0
- package/dist/graph/language.js.map +1 -0
- package/dist/graph/noise-filter.d.ts +46 -0
- package/dist/graph/noise-filter.d.ts.map +1 -0
- package/dist/graph/noise-filter.js +199 -0
- package/dist/graph/noise-filter.js.map +1 -0
- package/dist/graph/python-adapter.d.ts +36 -0
- package/dist/graph/python-adapter.d.ts.map +1 -0
- package/dist/graph/python-adapter.js +402 -0
- package/dist/graph/python-adapter.js.map +1 -0
- package/dist/graph/python-manifest.d.ts +22 -0
- package/dist/graph/python-manifest.d.ts.map +1 -0
- package/dist/graph/python-manifest.js +137 -0
- package/dist/graph/python-manifest.js.map +1 -0
- package/dist/graph/python-stdlib.d.ts +2 -0
- package/dist/graph/python-stdlib.d.ts.map +1 -0
- package/dist/graph/python-stdlib.js +53 -0
- package/dist/graph/python-stdlib.js.map +1 -0
- package/dist/graph/ts-morph-adapter.d.ts +65 -0
- package/dist/graph/ts-morph-adapter.d.ts.map +1 -0
- package/dist/graph/ts-morph-adapter.js +265 -0
- package/dist/graph/ts-morph-adapter.js.map +1 -0
- package/dist/graph/types.d.ts +37 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +50 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/infra/aws/aws-parse.d.ts +39 -0
- package/dist/infra/aws/aws-parse.d.ts.map +1 -0
- package/dist/infra/aws/aws-parse.js +149 -0
- package/dist/infra/aws/aws-parse.js.map +1 -0
- package/dist/infra/aws/aws.d.ts +6 -0
- package/dist/infra/aws/aws.d.ts.map +1 -0
- package/dist/infra/aws/aws.js +425 -0
- package/dist/infra/aws/aws.js.map +1 -0
- package/dist/infra/azure/azure-parse.d.ts +73 -0
- package/dist/infra/azure/azure-parse.d.ts.map +1 -0
- package/dist/infra/azure/azure-parse.js +178 -0
- package/dist/infra/azure/azure-parse.js.map +1 -0
- package/dist/infra/azure/azure.d.ts +12 -0
- package/dist/infra/azure/azure.d.ts.map +1 -0
- package/dist/infra/azure/azure.js +673 -0
- package/dist/infra/azure/azure.js.map +1 -0
- package/dist/infra/cloudflare/cloudflare.d.ts +50 -0
- package/dist/infra/cloudflare/cloudflare.d.ts.map +1 -0
- package/dist/infra/cloudflare/cloudflare.js +382 -0
- package/dist/infra/cloudflare/cloudflare.js.map +1 -0
- package/dist/infra/cloudflare/wrangler-parse.d.ts +6 -0
- package/dist/infra/cloudflare/wrangler-parse.d.ts.map +1 -0
- package/dist/infra/cloudflare/wrangler-parse.js +278 -0
- package/dist/infra/cloudflare/wrangler-parse.js.map +1 -0
- package/dist/infra/compose/compose-parse.d.ts +24 -0
- package/dist/infra/compose/compose-parse.d.ts.map +1 -0
- package/dist/infra/compose/compose-parse.js +77 -0
- package/dist/infra/compose/compose-parse.js.map +1 -0
- package/dist/infra/compose/compose.d.ts +12 -0
- package/dist/infra/compose/compose.d.ts.map +1 -0
- package/dist/infra/compose/compose.js +201 -0
- package/dist/infra/compose/compose.js.map +1 -0
- package/dist/infra/convex/convex-parse.d.ts +28 -0
- package/dist/infra/convex/convex-parse.d.ts.map +1 -0
- package/dist/infra/convex/convex-parse.js +74 -0
- package/dist/infra/convex/convex-parse.js.map +1 -0
- package/dist/infra/convex/convex.d.ts +18 -0
- package/dist/infra/convex/convex.d.ts.map +1 -0
- package/dist/infra/convex/convex.js +199 -0
- package/dist/infra/convex/convex.js.map +1 -0
- package/dist/infra/digitalocean/digitalocean.d.ts +33 -0
- package/dist/infra/digitalocean/digitalocean.d.ts.map +1 -0
- package/dist/infra/digitalocean/digitalocean.js +204 -0
- package/dist/infra/digitalocean/digitalocean.js.map +1 -0
- package/dist/infra/firebase/firebase.d.ts +43 -0
- package/dist/infra/firebase/firebase.d.ts.map +1 -0
- package/dist/infra/firebase/firebase.js +271 -0
- package/dist/infra/firebase/firebase.js.map +1 -0
- package/dist/infra/fly/fly-parse.d.ts +52 -0
- package/dist/infra/fly/fly-parse.d.ts.map +1 -0
- package/dist/infra/fly/fly-parse.js +114 -0
- package/dist/infra/fly/fly-parse.js.map +1 -0
- package/dist/infra/fly/fly.d.ts +15 -0
- package/dist/infra/fly/fly.d.ts.map +1 -0
- package/dist/infra/fly/fly.js +265 -0
- package/dist/infra/fly/fly.js.map +1 -0
- package/dist/infra/gcp/gcp-parse.d.ts +24 -0
- package/dist/infra/gcp/gcp-parse.d.ts.map +1 -0
- package/dist/infra/gcp/gcp-parse.js +123 -0
- package/dist/infra/gcp/gcp-parse.js.map +1 -0
- package/dist/infra/gcp/gcp.d.ts +10 -0
- package/dist/infra/gcp/gcp.d.ts.map +1 -0
- package/dist/infra/gcp/gcp.js +502 -0
- package/dist/infra/gcp/gcp.js.map +1 -0
- package/dist/infra/heroku/heroku-parse.d.ts +33 -0
- package/dist/infra/heroku/heroku-parse.d.ts.map +1 -0
- package/dist/infra/heroku/heroku-parse.js +63 -0
- package/dist/infra/heroku/heroku-parse.js.map +1 -0
- package/dist/infra/heroku/heroku.d.ts +24 -0
- package/dist/infra/heroku/heroku.d.ts.map +1 -0
- package/dist/infra/heroku/heroku.js +253 -0
- package/dist/infra/heroku/heroku.js.map +1 -0
- package/dist/infra/image-resolve.d.ts +56 -0
- package/dist/infra/image-resolve.d.ts.map +1 -0
- package/dist/infra/image-resolve.js +229 -0
- package/dist/infra/image-resolve.js.map +1 -0
- package/dist/infra/infra-step.d.ts +39 -0
- package/dist/infra/infra-step.d.ts.map +1 -0
- package/dist/infra/infra-step.js +57 -0
- package/dist/infra/infra-step.js.map +1 -0
- package/dist/infra/k8s/index.d.ts +78 -0
- package/dist/infra/k8s/index.d.ts.map +1 -0
- package/dist/infra/k8s/index.js +251 -0
- package/dist/infra/k8s/index.js.map +1 -0
- package/dist/infra/kamal/kamal-parse.d.ts +23 -0
- package/dist/infra/kamal/kamal-parse.d.ts.map +1 -0
- package/dist/infra/kamal/kamal-parse.js +66 -0
- package/dist/infra/kamal/kamal-parse.js.map +1 -0
- package/dist/infra/kamal/kamal.d.ts +17 -0
- package/dist/infra/kamal/kamal.d.ts.map +1 -0
- package/dist/infra/kamal/kamal.js +162 -0
- package/dist/infra/kamal/kamal.js.map +1 -0
- package/dist/infra/netlify/netlify.d.ts +33 -0
- package/dist/infra/netlify/netlify.d.ts.map +1 -0
- package/dist/infra/netlify/netlify.js +247 -0
- package/dist/infra/netlify/netlify.js.map +1 -0
- package/dist/infra/opentofu/opentofu.d.ts +3 -0
- package/dist/infra/opentofu/opentofu.d.ts.map +1 -0
- package/dist/infra/opentofu/opentofu.js +157 -0
- package/dist/infra/opentofu/opentofu.js.map +1 -0
- package/dist/infra/pulumi/pulumi-parse.d.ts +60 -0
- package/dist/infra/pulumi/pulumi-parse.d.ts.map +1 -0
- package/dist/infra/pulumi/pulumi-parse.js +155 -0
- package/dist/infra/pulumi/pulumi-parse.js.map +1 -0
- package/dist/infra/pulumi/pulumi.d.ts +23 -0
- package/dist/infra/pulumi/pulumi.d.ts.map +1 -0
- package/dist/infra/pulumi/pulumi.js +260 -0
- package/dist/infra/pulumi/pulumi.js.map +1 -0
- package/dist/infra/railway/railway-parse.d.ts +54 -0
- package/dist/infra/railway/railway-parse.d.ts.map +1 -0
- package/dist/infra/railway/railway-parse.js +200 -0
- package/dist/infra/railway/railway-parse.js.map +1 -0
- package/dist/infra/railway/railway.d.ts +19 -0
- package/dist/infra/railway/railway.d.ts.map +1 -0
- package/dist/infra/railway/railway.js +397 -0
- package/dist/infra/railway/railway.js.map +1 -0
- package/dist/infra/register.d.ts +2 -0
- package/dist/infra/register.d.ts.map +1 -0
- package/dist/infra/register.js +81 -0
- package/dist/infra/register.js.map +1 -0
- package/dist/infra/registry.d.ts +64 -0
- package/dist/infra/registry.d.ts.map +1 -0
- package/dist/infra/registry.js +205 -0
- package/dist/infra/registry.js.map +1 -0
- package/dist/infra/relevance.d.ts +16 -0
- package/dist/infra/relevance.d.ts.map +1 -0
- package/dist/infra/relevance.js +132 -0
- package/dist/infra/relevance.js.map +1 -0
- package/dist/infra/render/render-parse.d.ts +76 -0
- package/dist/infra/render/render-parse.d.ts.map +1 -0
- package/dist/infra/render/render-parse.js +155 -0
- package/dist/infra/render/render-parse.js.map +1 -0
- package/dist/infra/render/render.d.ts +11 -0
- package/dist/infra/render/render.d.ts.map +1 -0
- package/dist/infra/render/render.js +303 -0
- package/dist/infra/render/render.js.map +1 -0
- package/dist/infra/sst/sst-parse.d.ts +25 -0
- package/dist/infra/sst/sst-parse.d.ts.map +1 -0
- package/dist/infra/sst/sst-parse.js +45 -0
- package/dist/infra/sst/sst-parse.js.map +1 -0
- package/dist/infra/sst/sst.d.ts +19 -0
- package/dist/infra/sst/sst.d.ts.map +1 -0
- package/dist/infra/sst/sst.js +236 -0
- package/dist/infra/sst/sst.js.map +1 -0
- package/dist/infra/supabase/supabase-parse.d.ts +34 -0
- package/dist/infra/supabase/supabase-parse.d.ts.map +1 -0
- package/dist/infra/supabase/supabase-parse.js +113 -0
- package/dist/infra/supabase/supabase-parse.js.map +1 -0
- package/dist/infra/supabase/supabase.d.ts +15 -0
- package/dist/infra/supabase/supabase.d.ts.map +1 -0
- package/dist/infra/supabase/supabase.js +198 -0
- package/dist/infra/supabase/supabase.js.map +1 -0
- package/dist/infra/terraform/hcl-parse.d.ts +34 -0
- package/dist/infra/terraform/hcl-parse.d.ts.map +1 -0
- package/dist/infra/terraform/hcl-parse.js +203 -0
- package/dist/infra/terraform/hcl-parse.js.map +1 -0
- package/dist/infra/terraform/terraform.d.ts +14 -0
- package/dist/infra/terraform/terraform.d.ts.map +1 -0
- package/dist/infra/terraform/terraform.js +264 -0
- package/dist/infra/terraform/terraform.js.map +1 -0
- package/dist/infra/types.d.ts +151 -0
- package/dist/infra/types.d.ts.map +1 -0
- package/dist/infra/types.js +14 -0
- package/dist/infra/types.js.map +1 -0
- package/dist/infra/vercel/vercel-parse.d.ts +70 -0
- package/dist/infra/vercel/vercel-parse.d.ts.map +1 -0
- package/dist/infra/vercel/vercel-parse.js +194 -0
- package/dist/infra/vercel/vercel-parse.js.map +1 -0
- package/dist/infra/vercel/vercel.d.ts +30 -0
- package/dist/infra/vercel/vercel.d.ts.map +1 -0
- package/dist/infra/vercel/vercel.js +523 -0
- package/dist/infra/vercel/vercel.js.map +1 -0
- package/dist/infra/walk.d.ts +36 -0
- package/dist/infra/walk.d.ts.map +1 -0
- package/dist/infra/walk.js +85 -0
- package/dist/infra/walk.js.map +1 -0
- package/dist/safety.d.ts +13 -0
- package/dist/safety.d.ts.map +1 -0
- package/dist/safety.js +67 -0
- package/dist/safety.js.map +1 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +111 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +35 -0
- package/dist/version.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
// the Celery FrameworkAdapter. Extracted from the FastAPI adapter's
|
|
2
|
+
// gated Celery pass into a DEDICATED, standalone adapter that fires for
|
|
3
|
+
// ANY Celery repo (not only FastAPI + Celery), and DEEPENED: Celery Beat periodic
|
|
4
|
+
// schedules and `chain`/`group`/`chord` canvas composition.
|
|
5
|
+
//
|
|
6
|
+
// Celery declares its background-task surface with decorators + a broker config,
|
|
7
|
+
// which we read STATICALLY (install-free, never-store-source — a pure syntactic
|
|
8
|
+
// Pyright parse via the shared Python core; never executes repo code), and persist
|
|
9
|
+
// only the derived edges/roles:
|
|
10
|
+
//
|
|
11
|
+
// * detect() — the `celery` dependency (a `celery-*` / `django-celery-*`
|
|
12
|
+
// / `flower` extension raises confidence); shallow nested
|
|
13
|
+
// scan for a `backend/`|`worker/`|`server/` package (mirrors
|
|
14
|
+
// FastAPI's ).
|
|
15
|
+
// * roleTags — a Celery TASK (`@shared_task`, `@app.task`/`@celery_app.task`
|
|
16
|
+
// incl. an imported Celery app cross-file) → `task`; a Beat
|
|
17
|
+
// PERIODIC task (`@periodic_task`, or a task referenced by a
|
|
18
|
+
// `beat_schedule` config entry) → `scheduled-task`. Both map
|
|
19
|
+
// onto the LOCKED `job` MODULE_KIND (own-code triggered by a
|
|
20
|
+
// queue / schedule, not a request); never a new kind — only
|
|
21
|
+
// `role` renders.
|
|
22
|
+
// * syntheticEdges — the async wiring the import graph would render as a plain
|
|
23
|
+
// call or miss entirely: `.delay()`/`.apply_async()`/`.s()`/
|
|
24
|
+
// `.si()` enqueue (kind 'publishes'); `chain(a.s(), b.s())`
|
|
25
|
+
// sequential composition → task→task 'publishes'; `chord`
|
|
26
|
+
// header→callback 'publishes'; and a `beat_schedule` entry →
|
|
27
|
+
// its scheduled task (kind 'publishes', relation 'beat-schedule').
|
|
28
|
+
//
|
|
29
|
+
// The adapter is IMPORT-GATED (`@shared_task`/`chain`/`group`/`chord`/`Celery`
|
|
30
|
+
// are only honored when imported from a `celery` module in that file), so an
|
|
31
|
+
// unrelated `itertools.chain(...)` or a foreign `@task` never produces a false
|
|
32
|
+
// edge/role. Unresolvable enqueue / composition / schedule targets DEGRADE + LOG —
|
|
33
|
+
// no silent caps.
|
|
34
|
+
//
|
|
35
|
+
// NOTE: Grouping is intentionally NOT contributed — Celery has no per-domain
|
|
36
|
+
// structural unit like a FastAPI router / Flask blueprint; task files stay in the
|
|
37
|
+
// host framework's / directory grouping. This matches the behavior the
|
|
38
|
+
// adapter extracts (roles + edges only).
|
|
39
|
+
import { existsSync, readdirSync } from 'node:fs';
|
|
40
|
+
import { join } from 'node:path';
|
|
41
|
+
import { clampConfidence, resolveBase } from '../detect-util.js';
|
|
42
|
+
import { readPythonDeps } from '../../graph/python-manifest.js';
|
|
43
|
+
import { syntacticResolve } from '../../graph/python-adapter.js';
|
|
44
|
+
import { parsePythonScope } from '../python/analyze.js';
|
|
45
|
+
import { callCallee, dictEntries, keywordArg, memberChain, nameValue, positionalArgs, stringValue, PN, } from '../python/py-ast.js';
|
|
46
|
+
/** Gather the signal set for a single root dir (reads manifests only). */
|
|
47
|
+
export function gatherCelerySignals(baseDir) {
|
|
48
|
+
const deps = readPythonDeps(baseDir);
|
|
49
|
+
return {
|
|
50
|
+
hasCelery: deps.has('celery'),
|
|
51
|
+
// A Beat/monitoring extension is a strong secondary signal this really is a
|
|
52
|
+
// Celery deployment (vs. `celery` pulled in transitively).
|
|
53
|
+
hasCeleryExtension: [...deps].some((d) => d === 'flower' || d.startsWith('celery-') || d.startsWith('django-celery')),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
// Non-source dirs the nested scan skips (cheap + can't hold a first-party manifest).
|
|
57
|
+
const NESTED_SKIP_DIRS = new Set([
|
|
58
|
+
'node_modules',
|
|
59
|
+
'dist',
|
|
60
|
+
'build',
|
|
61
|
+
'out',
|
|
62
|
+
'coverage',
|
|
63
|
+
'venv',
|
|
64
|
+
'.venv',
|
|
65
|
+
'__pycache__',
|
|
66
|
+
'site-packages',
|
|
67
|
+
]);
|
|
68
|
+
/** True if `dir` holds a Python manifest worth scanning for deps. */
|
|
69
|
+
function hasPythonManifest(dir) {
|
|
70
|
+
return (existsSync(join(dir, 'pyproject.toml')) ||
|
|
71
|
+
existsSync(join(dir, 'setup.py')) ||
|
|
72
|
+
existsSync(join(dir, 'setup.cfg')) ||
|
|
73
|
+
existsSync(join(dir, 'requirements.txt')));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Immediate subdirs (depth 1) that contain a Python manifest — the shallow search
|
|
77
|
+
* for a nested Celery worker (`backend/` | `worker/` | `server/`). Sorted, so the
|
|
78
|
+
* first-match pick is deterministic; skips dot-dirs + non-source dirs to stay cheap.
|
|
79
|
+
*/
|
|
80
|
+
function shallowManifestSubdirs(base) {
|
|
81
|
+
let entries;
|
|
82
|
+
try {
|
|
83
|
+
entries = readdirSync(base, { withFileTypes: true });
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
const out = [];
|
|
89
|
+
for (const e of entries) {
|
|
90
|
+
if (!e.isDirectory() || e.name.startsWith('.') || NESTED_SKIP_DIRS.has(e.name))
|
|
91
|
+
continue;
|
|
92
|
+
if (hasPythonManifest(join(base, e.name)))
|
|
93
|
+
out.push(e.name);
|
|
94
|
+
}
|
|
95
|
+
return out.sort();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Decide Celery from the signal set. `celery` is REQUIRED; a Beat/monitoring
|
|
99
|
+
* extension raises confidence. Returns null → generic-Python fallthrough,
|
|
100
|
+
* byte-for-byte unchanged.
|
|
101
|
+
*/
|
|
102
|
+
export function scoreCelery(s, rootPath = '') {
|
|
103
|
+
if (!s.hasCelery)
|
|
104
|
+
return null;
|
|
105
|
+
let confidence = 0.8;
|
|
106
|
+
if (s.hasCeleryExtension)
|
|
107
|
+
confidence += 0.1;
|
|
108
|
+
return {
|
|
109
|
+
adapter: 'celery',
|
|
110
|
+
confidence: clampConfidence(confidence),
|
|
111
|
+
rootPath,
|
|
112
|
+
metadata: {
|
|
113
|
+
signals: { celery: s.hasCelery, celeryExtension: s.hasCeleryExtension },
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const ROLE_PRIORITY = {
|
|
118
|
+
'scheduled-task': 6,
|
|
119
|
+
task: 5,
|
|
120
|
+
};
|
|
121
|
+
const ROLE_KIND = {
|
|
122
|
+
'scheduled-task': 'job',
|
|
123
|
+
task: 'job',
|
|
124
|
+
};
|
|
125
|
+
// Celery enqueue methods: `.delay()` / `.apply_async()` (immediate) + `.s()` /
|
|
126
|
+
// `.si()` (signature / immutable-signature — a task reference wired into a canvas).
|
|
127
|
+
const ENQUEUE_METHODS = new Set(['delay', 'apply_async', 's', 'si']);
|
|
128
|
+
// Celery canvas composition primitives (imported from `celery`).
|
|
129
|
+
const COMPOSITION_NAMES = new Set(['chain', 'group', 'chord']);
|
|
130
|
+
// The `celery`-origin symbols this adapter honors — import-gated, so a foreign
|
|
131
|
+
// `@task` / `itertools.chain` never fires. `task` covers the legacy bare
|
|
132
|
+
// `from celery import task` decorator; `Celery` covers an aliased app import.
|
|
133
|
+
const CELERY_SYMBOLS = new Set([
|
|
134
|
+
'shared_task',
|
|
135
|
+
'task',
|
|
136
|
+
'periodic_task',
|
|
137
|
+
'chain',
|
|
138
|
+
'group',
|
|
139
|
+
'chord',
|
|
140
|
+
'Celery',
|
|
141
|
+
]);
|
|
142
|
+
// Names a `beat_schedule` config binds to (module-level or `app.conf.<name>`).
|
|
143
|
+
const BEAT_SCHEDULE_NAMES = new Set(['beat_schedule', 'CELERYBEAT_SCHEDULE', 'CELERY_BEAT_SCHEDULE']);
|
|
144
|
+
// Memoized on the FrameworkContext OBJECT (not repoDir) so syntheticEdges +
|
|
145
|
+
// roleTags share ONE parse, while the merge walk's per-checkpoint ctx gets a fresh
|
|
146
|
+
// analysis — no cross-tree staleness. Mirrors fastapi / flask / nest.
|
|
147
|
+
const ANALYSIS_CACHE = new WeakMap();
|
|
148
|
+
function addRole(map, fileId, role) {
|
|
149
|
+
const cur = map.get(fileId);
|
|
150
|
+
if (cur === undefined ||
|
|
151
|
+
ROLE_PRIORITY[role] > ROLE_PRIORITY[cur] ||
|
|
152
|
+
(ROLE_PRIORITY[role] === ROLE_PRIORITY[cur] && role < cur)) {
|
|
153
|
+
map.set(fileId, role);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function addEdge(edges, from, to, kind, relation) {
|
|
157
|
+
if (from === to)
|
|
158
|
+
return; // self-references collapse; the contribute-step drops self-edges too
|
|
159
|
+
const key = `${from}→${to}:${kind}`;
|
|
160
|
+
if (!edges.has(key)) {
|
|
161
|
+
edges.set(key, { source: from, target: to, kind, metadata: { framework: 'celery', relation } });
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// The constructor name of an `x = Ctor(...)` assignment RHS (last chain segment,
|
|
165
|
+
// so both `Celery(...)` and `celery.Celery(...)` read as 'Celery'), or undefined.
|
|
166
|
+
function assignedCtorName(rhs) {
|
|
167
|
+
if (rhs.nodeType !== PN.Call)
|
|
168
|
+
return undefined;
|
|
169
|
+
const callee = callCallee(rhs);
|
|
170
|
+
if (!callee)
|
|
171
|
+
return undefined;
|
|
172
|
+
return callee.path.length ? callee.path[callee.path.length - 1] : callee.root;
|
|
173
|
+
}
|
|
174
|
+
// A decorator's callee chain (`@app.task(...)` → root 'app', path ['task'];
|
|
175
|
+
// `@shared_task` → root 'shared_task', path []). The decorator expr is either a
|
|
176
|
+
// call (with args) or a bare name/attribute.
|
|
177
|
+
function decoratorChain(deco) {
|
|
178
|
+
const expr = deco.d.expr;
|
|
179
|
+
if (expr.nodeType === PN.Call)
|
|
180
|
+
return callCallee(expr);
|
|
181
|
+
return memberChain(expr);
|
|
182
|
+
}
|
|
183
|
+
// The final segment of an assignment LHS (`beat_schedule` → 'beat_schedule';
|
|
184
|
+
// `app.conf.beat_schedule` → 'beat_schedule'), or undefined for a non-name LHS.
|
|
185
|
+
function assignmentTargetName(leftExpr) {
|
|
186
|
+
const chain = memberChain(leftExpr);
|
|
187
|
+
if (!chain)
|
|
188
|
+
return undefined;
|
|
189
|
+
return chain.path.length ? chain.path[chain.path.length - 1] : chain.root;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Per-file `localName → canonical celery symbol` map for `from celery(.*) import X`
|
|
193
|
+
* (`from celery import shared_task, chain` / `from celery.decorators import
|
|
194
|
+
* periodic_task` / `from celery import Celery as C`). Import-gating: a symbol is
|
|
195
|
+
* only honored when it genuinely came from a `celery` module in THIS file.
|
|
196
|
+
*/
|
|
197
|
+
function celeryImportNames(imports) {
|
|
198
|
+
const out = new Map();
|
|
199
|
+
for (const imp of imports) {
|
|
200
|
+
if (imp.nodeType !== PN.ImportFrom)
|
|
201
|
+
continue;
|
|
202
|
+
const from = imp;
|
|
203
|
+
if (from.d.module.d.leadingDots !== 0)
|
|
204
|
+
continue; // celery is an absolute import
|
|
205
|
+
const parts = from.d.module.d.nameParts.map((p) => p.d.value);
|
|
206
|
+
if (parts[0] !== 'celery')
|
|
207
|
+
continue; // celery / celery.canvas / celery.schedules / …
|
|
208
|
+
for (const spec of from.d.imports) {
|
|
209
|
+
const imported = spec.d.name.d.value;
|
|
210
|
+
const local = spec.d.alias ? spec.d.alias.d.value : imported;
|
|
211
|
+
if (CELERY_SYMBOLS.has(imported))
|
|
212
|
+
out.set(local, imported);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return out;
|
|
216
|
+
}
|
|
217
|
+
function analyzeCelery(ctx) {
|
|
218
|
+
const { parsed, internalIds, roots } = parsePythonScope(ctx);
|
|
219
|
+
// Pass 1 — per-file celery `import` gates + Celery() app object variables
|
|
220
|
+
// (file-scoped, matching how these module-level singletons are used).
|
|
221
|
+
const celeryImportsByFile = new Map();
|
|
222
|
+
const celeryVarsByFile = new Map();
|
|
223
|
+
for (const [id, file] of parsed) {
|
|
224
|
+
const celeryImports = celeryImportNames(file.nodes.imports);
|
|
225
|
+
celeryImportsByFile.set(id, celeryImports);
|
|
226
|
+
const celeryVars = new Set();
|
|
227
|
+
for (const a of file.nodes.assignments) {
|
|
228
|
+
const target = nameValue(a.d.leftExpr);
|
|
229
|
+
if (!target)
|
|
230
|
+
continue;
|
|
231
|
+
const ctor = assignedCtorName(a.d.rightExpr);
|
|
232
|
+
// Direct `Celery(...)` or an aliased-import `C(...)` where `C` came from celery.
|
|
233
|
+
if (ctor && (ctor === 'Celery' || celeryImports.get(ctor) === 'Celery'))
|
|
234
|
+
celeryVars.add(target);
|
|
235
|
+
}
|
|
236
|
+
celeryVarsByFile.set(id, celeryVars);
|
|
237
|
+
}
|
|
238
|
+
// Files that construct a Celery() app — so a `@<imported_app>.task` in ANOTHER
|
|
239
|
+
// file (the common `from proj.celery import app` + `@app.task` layout) is
|
|
240
|
+
// recognized as a task, not just a same-file `@celery_app.task`.
|
|
241
|
+
const celeryAppFiles = new Set();
|
|
242
|
+
for (const [f, vars] of celeryVarsByFile)
|
|
243
|
+
if (vars.size > 0)
|
|
244
|
+
celeryAppFiles.add(f);
|
|
245
|
+
const roleByFile = new Map();
|
|
246
|
+
const edges = new Map();
|
|
247
|
+
const diag = {
|
|
248
|
+
unresolvedEnqueues: new Set(),
|
|
249
|
+
unresolvedComposition: new Set(),
|
|
250
|
+
unresolvedSchedules: new Set(),
|
|
251
|
+
};
|
|
252
|
+
// Resolve a canvas member expression to its task file id:
|
|
253
|
+
// `task.s(...)` / `task.si(...)` → the `task` root (path ['s'|'si'])
|
|
254
|
+
// `task` (bare Name) → the imported task
|
|
255
|
+
// Deeper chains (`mod.task.s()`) degrade to undefined. Same-file tasks resolve
|
|
256
|
+
// to `thisFile` (a self-edge, dropped by addEdge) via a local-def fallback.
|
|
257
|
+
function resolveCanvasTask(expr, thisFile, binds, localDefs) {
|
|
258
|
+
if (!expr)
|
|
259
|
+
return undefined;
|
|
260
|
+
let root;
|
|
261
|
+
if (expr.nodeType === PN.Call) {
|
|
262
|
+
const callee = callCallee(expr);
|
|
263
|
+
if (callee && callee.path.length === 1 && (callee.path[0] === 's' || callee.path[0] === 'si')) {
|
|
264
|
+
root = callee.root;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
const chain = memberChain(expr);
|
|
269
|
+
if (chain && chain.path.length === 0)
|
|
270
|
+
root = chain.root;
|
|
271
|
+
}
|
|
272
|
+
if (root === undefined)
|
|
273
|
+
return undefined;
|
|
274
|
+
return binds.get(root) ?? (localDefs.has(root) ? thisFile : undefined);
|
|
275
|
+
}
|
|
276
|
+
// The header tasks of a `chord(header, callback)`: a `group(...)` call's args,
|
|
277
|
+
// a list literal's items, or a single task. The `group` is import-gated
|
|
278
|
+
// (canonical), so an aliased `group as g` header still resolves.
|
|
279
|
+
function resolveChordHeader(header, thisFile, binds, localDefs, celeryImports) {
|
|
280
|
+
if (!header)
|
|
281
|
+
return [];
|
|
282
|
+
if (header.nodeType === PN.Call) {
|
|
283
|
+
const callee = callCallee(header);
|
|
284
|
+
if (callee && callee.path.length === 0 && celeryImports.get(callee.root) === 'group') {
|
|
285
|
+
return positionalArgs(header).map((m) => resolveCanvasTask(m, thisFile, binds, localDefs));
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (header.nodeType === PN.List) {
|
|
289
|
+
return header.d.items.map((m) => resolveCanvasTask(m, thisFile, binds, localDefs));
|
|
290
|
+
}
|
|
291
|
+
return [resolveCanvasTask(header, thisFile, binds, localDefs)];
|
|
292
|
+
}
|
|
293
|
+
// Read a `beat_schedule = { name: { 'task': 'dotted.path', … }, … }` config,
|
|
294
|
+
// resolve each entry's task to a file, tag it `scheduled-task`, and add a
|
|
295
|
+
// config→task 'publishes' edge (relation 'beat-schedule').
|
|
296
|
+
function readBeatSchedule(scheduleExpr, configFile, binds) {
|
|
297
|
+
for (const entry of dictEntries(scheduleExpr)) {
|
|
298
|
+
const spec = entry.valueExpr; // the per-entry `{ 'task': …, 'schedule': … }` dict
|
|
299
|
+
const taskExpr = dictEntries(spec).find((e) => stringValue(e.keyExpr) === 'task')?.valueExpr;
|
|
300
|
+
if (!taskExpr)
|
|
301
|
+
continue;
|
|
302
|
+
const target = resolveBeatTask(taskExpr, configFile, binds);
|
|
303
|
+
if (target) {
|
|
304
|
+
addRole(roleByFile, target, 'scheduled-task');
|
|
305
|
+
addEdge(edges, configFile, target, 'publishes', 'beat-schedule');
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
const label = stringValue(taskExpr) ?? nameValue(taskExpr) ?? '<expr>';
|
|
309
|
+
diag.unresolvedSchedules.add(`${configFile}: beat_schedule task ${label}`);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
// Resolve a beat entry's `'task'` value to a file id: a dotted string
|
|
314
|
+
// (`'app.workers.tasks.add'` → its module `app.workers.tasks`) or a bare
|
|
315
|
+
// task reference resolved through the file's import bindings.
|
|
316
|
+
function resolveBeatTask(taskExpr, fromFile, binds) {
|
|
317
|
+
const dotted = stringValue(taskExpr);
|
|
318
|
+
if (dotted) {
|
|
319
|
+
const segs = dotted.split('.');
|
|
320
|
+
if (segs.length < 2)
|
|
321
|
+
return undefined; // need module.function
|
|
322
|
+
const modulePath = segs.slice(0, -1).join('.');
|
|
323
|
+
return syntacticResolve(modulePath, fromFile, internalIds, roots);
|
|
324
|
+
}
|
|
325
|
+
const chain = memberChain(taskExpr);
|
|
326
|
+
return chain ? binds.get(chain.root) : undefined;
|
|
327
|
+
}
|
|
328
|
+
for (const [id, file] of parsed) {
|
|
329
|
+
const celeryImports = celeryImportsByFile.get(id);
|
|
330
|
+
const celeryVars = celeryVarsByFile.get(id);
|
|
331
|
+
const binds = file.bindings;
|
|
332
|
+
const localDefs = new Set();
|
|
333
|
+
for (const fn of file.nodes.functions) {
|
|
334
|
+
const n = nameValue(fn.d.name);
|
|
335
|
+
if (n)
|
|
336
|
+
localDefs.add(n);
|
|
337
|
+
}
|
|
338
|
+
// Task + periodic decorators.
|
|
339
|
+
for (const fn of file.nodes.functions) {
|
|
340
|
+
for (const deco of fn.d.decorators) {
|
|
341
|
+
const chain = decoratorChain(deco);
|
|
342
|
+
if (!chain)
|
|
343
|
+
continue;
|
|
344
|
+
if (chain.path.length === 0) {
|
|
345
|
+
// Bare `@shared_task` / `@task` / `@periodic_task` — import-gated to celery.
|
|
346
|
+
const canonical = celeryImports.get(chain.root);
|
|
347
|
+
if (canonical === 'periodic_task')
|
|
348
|
+
addRole(roleByFile, id, 'scheduled-task');
|
|
349
|
+
else if (canonical === 'shared_task' || canonical === 'task')
|
|
350
|
+
addRole(roleByFile, id, 'task');
|
|
351
|
+
}
|
|
352
|
+
else if (chain.path.length === 1 && chain.path[0] === 'task') {
|
|
353
|
+
// `@<celeryapp>.task` — the app is defined here OR imported from a file
|
|
354
|
+
// that constructs a Celery() app.
|
|
355
|
+
const importedApp = binds.get(chain.root);
|
|
356
|
+
if (celeryVars.has(chain.root) || (importedApp !== undefined && celeryAppFiles.has(importedApp))) {
|
|
357
|
+
addRole(roleByFile, id, 'task');
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
// Enqueue + canvas-composition + beat-config-update edges.
|
|
363
|
+
for (const call of file.nodes.calls) {
|
|
364
|
+
const callee = callCallee(call);
|
|
365
|
+
if (!callee)
|
|
366
|
+
continue;
|
|
367
|
+
// A bare celery-origin composition primitive (import-gated → canonical, so an
|
|
368
|
+
// aliased `chain as c` still resolves; a foreign `itertools.chain` yields
|
|
369
|
+
// undefined and is skipped). `group(...)` maps here too but emits no
|
|
370
|
+
// task→task edge (its members run in parallel).
|
|
371
|
+
const compositionSym = callee.path.length === 0 ? celeryImports.get(callee.root) : undefined;
|
|
372
|
+
if (callee.path.length === 1 && ENQUEUE_METHODS.has(callee.path[0])) {
|
|
373
|
+
// `sometask.delay(...)` / `.apply_async()` / `.s()` / `.si()` — the callee
|
|
374
|
+
// root is the imported task function; a same-file task is a self-edge.
|
|
375
|
+
const obj = callee.root;
|
|
376
|
+
const target = binds.get(obj) ?? (localDefs.has(obj) ? id : undefined);
|
|
377
|
+
if (target)
|
|
378
|
+
addEdge(edges, id, target, 'publishes', 'celery-enqueue');
|
|
379
|
+
else
|
|
380
|
+
diag.unresolvedEnqueues.add(`${id}: ${obj}.${callee.path[0]}(…)`);
|
|
381
|
+
}
|
|
382
|
+
else if (compositionSym && COMPOSITION_NAMES.has(compositionSym)) {
|
|
383
|
+
const args = positionalArgs(call);
|
|
384
|
+
if (compositionSym === 'chain') {
|
|
385
|
+
// Sequential pipe: consecutive resolvable members → task→task publishes.
|
|
386
|
+
// Log each unresolved member once (at its own index), then link the
|
|
387
|
+
// resolved consecutive pairs (never bridging across an unknown).
|
|
388
|
+
const resolved = args.map((m) => resolveCanvasTask(m, id, binds, localDefs));
|
|
389
|
+
resolved.forEach((r, idx) => {
|
|
390
|
+
if (!r)
|
|
391
|
+
diag.unresolvedComposition.add(`${id}: chain(…) member ${idx} unresolved`);
|
|
392
|
+
});
|
|
393
|
+
for (let i = 0; i < resolved.length - 1; i++) {
|
|
394
|
+
const a = resolved[i];
|
|
395
|
+
const b = resolved[i + 1];
|
|
396
|
+
if (a && b)
|
|
397
|
+
addEdge(edges, a, b, 'publishes', 'chain');
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
else if (compositionSym === 'chord') {
|
|
401
|
+
// header (a group / list / single) → callback.
|
|
402
|
+
const callback = keywordArg(call, 'body') ?? args[1];
|
|
403
|
+
const cbFile = resolveCanvasTask(callback, id, binds, localDefs);
|
|
404
|
+
const header = resolveChordHeader(args[0], id, binds, localDefs, celeryImports);
|
|
405
|
+
if (cbFile) {
|
|
406
|
+
for (const ht of header) {
|
|
407
|
+
if (ht)
|
|
408
|
+
addEdge(edges, ht, cbFile, 'publishes', 'chord');
|
|
409
|
+
else
|
|
410
|
+
diag.unresolvedComposition.add(`${id}: chord(…) header member unresolved`);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
diag.unresolvedComposition.add(`${id}: chord(…) callback unresolved`);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
// `group(...)` (compositionSym === 'group') → no task→task ordering edge
|
|
418
|
+
// (each member's `.s()` is already a call-site publishes above).
|
|
419
|
+
}
|
|
420
|
+
// `app.conf.update(beat_schedule={…})` — a beat config passed as a kwarg.
|
|
421
|
+
const beatKwarg = keywordArg(call, 'beat_schedule');
|
|
422
|
+
if (beatKwarg)
|
|
423
|
+
readBeatSchedule(beatKwarg, id, binds);
|
|
424
|
+
}
|
|
425
|
+
// `beat_schedule = {…}` / `CELERY_BEAT_SCHEDULE = {…}` / `app.conf.beat_schedule = {…}`.
|
|
426
|
+
for (const a of file.nodes.assignments) {
|
|
427
|
+
const name = assignmentTargetName(a.d.leftExpr);
|
|
428
|
+
if (name && BEAT_SCHEDULE_NAMES.has(name))
|
|
429
|
+
readBeatSchedule(a.d.rightExpr, id, binds);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
const roles = new Map();
|
|
433
|
+
for (const [fileId, role] of roleByFile) {
|
|
434
|
+
roles.set(fileId, {
|
|
435
|
+
role,
|
|
436
|
+
kind: ROLE_KIND[role],
|
|
437
|
+
priority: ROLE_PRIORITY[role],
|
|
438
|
+
metadata: { framework: 'celery' },
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
const sortedEdges = [...edges.values()].sort((a, b) => a.source < b.source
|
|
442
|
+
? -1
|
|
443
|
+
: a.source > b.source
|
|
444
|
+
? 1
|
|
445
|
+
: a.target < b.target
|
|
446
|
+
? -1
|
|
447
|
+
: a.target > b.target
|
|
448
|
+
? 1
|
|
449
|
+
: a.kind < b.kind
|
|
450
|
+
? -1
|
|
451
|
+
: a.kind > b.kind
|
|
452
|
+
? 1
|
|
453
|
+
: 0);
|
|
454
|
+
// Positive signal for validation (mirrors fastapi / flask / nest's log line).
|
|
455
|
+
if (roleByFile.size > 0 || sortedEdges.length > 0) {
|
|
456
|
+
console.log(` [celery] ${roleByFile.size} role(s) · ${sortedEdges.length} edge(s)`);
|
|
457
|
+
}
|
|
458
|
+
// No silent caps (locked): log everything that degraded.
|
|
459
|
+
if (diag.unresolvedEnqueues.size > 0 ||
|
|
460
|
+
diag.unresolvedComposition.size > 0 ||
|
|
461
|
+
diag.unresolvedSchedules.size > 0) {
|
|
462
|
+
const parts = [];
|
|
463
|
+
if (diag.unresolvedEnqueues.size > 0) {
|
|
464
|
+
parts.push(`${diag.unresolvedEnqueues.size} unresolvable enqueue(s): ${[...diag.unresolvedEnqueues].sort().slice(0, 10).join(' · ')}`);
|
|
465
|
+
}
|
|
466
|
+
if (diag.unresolvedComposition.size > 0) {
|
|
467
|
+
parts.push(`${diag.unresolvedComposition.size} unresolvable composition(s): ${[...diag.unresolvedComposition].sort().slice(0, 10).join(' · ')}`);
|
|
468
|
+
}
|
|
469
|
+
if (diag.unresolvedSchedules.size > 0) {
|
|
470
|
+
parts.push(`${diag.unresolvedSchedules.size} unresolvable schedule(s): ${[...diag.unresolvedSchedules].sort().slice(0, 10).join(' · ')}`);
|
|
471
|
+
}
|
|
472
|
+
console.log(` [celery] degraded: ${parts.join(' · ')} (logged, not silently dropped)`);
|
|
473
|
+
}
|
|
474
|
+
return { edges: sortedEdges, roles };
|
|
475
|
+
}
|
|
476
|
+
function getAnalysis(ctx) {
|
|
477
|
+
let a = ANALYSIS_CACHE.get(ctx);
|
|
478
|
+
if (!a) {
|
|
479
|
+
a = analyzeCelery(ctx);
|
|
480
|
+
ANALYSIS_CACHE.set(ctx, a);
|
|
481
|
+
}
|
|
482
|
+
return a;
|
|
483
|
+
}
|
|
484
|
+
// ---------------------------------------------------------------------------
|
|
485
|
+
// The adapter. Roles + edges only — no groupingPrior (Celery has no per-domain
|
|
486
|
+
// structural unit; task files stay in the host framework's / directory grouping).
|
|
487
|
+
export const celeryAdapter = {
|
|
488
|
+
name: 'celery',
|
|
489
|
+
async detect(ctx) {
|
|
490
|
+
const { base, rootPath } = resolveBase(ctx);
|
|
491
|
+
// Root scan first (a repo whose manifest is at root reports rootPath '').
|
|
492
|
+
const rootMatch = scoreCelery(gatherCelerySignals(base), rootPath);
|
|
493
|
+
if (rootMatch)
|
|
494
|
+
return rootMatch;
|
|
495
|
+
// A Celery worker often lives one dir down (a `backend/` | `worker/` |
|
|
496
|
+
// `server/` package). Shallow-scan immediate subdirs and scope to it. Only
|
|
497
|
+
// when NOT already scoped to a workspace package (the path).
|
|
498
|
+
if (!ctx.packageDir) {
|
|
499
|
+
for (const sub of shallowManifestSubdirs(base)) {
|
|
500
|
+
const m = scoreCelery(gatherCelerySignals(join(base, sub)), sub);
|
|
501
|
+
if (m)
|
|
502
|
+
return m;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
return null;
|
|
506
|
+
},
|
|
507
|
+
// `.delay`/`.apply_async`/`.s`/`.si` enqueue + chain/chord composition + beat
|
|
508
|
+
// schedule → 'publishes'. File-id endpoints; the step resolves to modules,
|
|
509
|
+
// drops self-edges, dedupes, 8-verb-validates.
|
|
510
|
+
async syntheticEdges(ctx) {
|
|
511
|
+
return getAnalysis(ctx).edges;
|
|
512
|
+
},
|
|
513
|
+
// task / scheduled-task → job. METADATA; the module's `kind` is unchanged.
|
|
514
|
+
async roleTags(ctx) {
|
|
515
|
+
return getAnalysis(ctx).roles;
|
|
516
|
+
},
|
|
517
|
+
// The hooks READ SOURCE (Python). Declare the paths the diff-driven hosted walk
|
|
518
|
+
// must treat as framework-relevant. Never-store-source holds: parse server-side,
|
|
519
|
+
// persist only the derived edges/roles.
|
|
520
|
+
scansSourcePath(path) {
|
|
521
|
+
return path.endsWith('.py') || path.endsWith('.pyi');
|
|
522
|
+
},
|
|
523
|
+
};
|
|
524
|
+
//# sourceMappingURL=celery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"celery.js","sourceRoot":"","sources":["../../../src/framework/celery/celery.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,kFAAkF;AAClF,4DAA4D;AAC5D,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,mFAAmF;AACnF,gCAAgC;AAChC,EAAE;AACF,kFAAkF;AAClF,gFAAgF;AAChF,mFAAmF;AACnF,qCAAqC;AACrC,sFAAsF;AACtF,kFAAkF;AAClF,mFAAmF;AACnF,mFAAmF;AACnF,mFAAmF;AACnF,kFAAkF;AAClF,wCAAwC;AACxC,kFAAkF;AAClF,mFAAmF;AACnF,kFAAkF;AAClF,gFAAgF;AAChF,mFAAmF;AACnF,yFAAyF;AACzF,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,mFAAmF;AACnF,kBAAkB;AAClB,EAAE;AACF,6EAA6E;AAC7E,kFAAkF;AAClF,wEAAwE;AACxE,yCAAyC;AAEzC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA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CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;YACpB,KAAK,MAAM,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/C,MAAM,CAAC,GAAG,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;gBACjE,IAAI,CAAC;oBAAE,OAAO,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8EAA8E;IAC9E,2EAA2E;IAC3E,+CAA+C;IAC/C,KAAK,CAAC,cAAc,CAAC,GAAqB;QACxC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,2EAA2E;IAC3E,KAAK,CAAC,QAAQ,CAAC,GAAqB;QAClC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,gFAAgF;IAChF,iFAAiF;IACjF,wCAAwC;IACxC,eAAe,CAAC,IAAY;QAC1B,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type Edge } from '../types.js';
|
|
2
|
+
import type { ClusterResult } from '../cluster/louvain.js';
|
|
3
|
+
import type { NormalizedGraph } from '../graph/types.js';
|
|
4
|
+
import type { RoleTag } from './types.js';
|
|
5
|
+
export interface FrameworkContributions {
|
|
6
|
+
/** Module-resolved, self-edge-free, deduped, 8-verb-validated edges. */
|
|
7
|
+
edges: Edge[];
|
|
8
|
+
/** moduleId → RoleTag (collapsed to the highest-priority role per module). */
|
|
9
|
+
roles: Map<string, RoleTag>;
|
|
10
|
+
/**
|
|
11
|
+
* moduleId → the adapter-authoritative subsystem assigned to it (the
|
|
12
|
+
* namespaced group id + its label). Informational/observability: the ACTUAL
|
|
13
|
+
* effect is the in-place override of `cluster.modules[].packageId/packageName`
|
|
14
|
+
* (see below), so assemble's computeSubsystems renders the framework grouping.
|
|
15
|
+
*/
|
|
16
|
+
subsystems: Map<string, {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
}>;
|
|
20
|
+
counts: {
|
|
21
|
+
adapters: number;
|
|
22
|
+
rawEdges: number;
|
|
23
|
+
edges: number;
|
|
24
|
+
droppedSelf: number;
|
|
25
|
+
droppedUnresolved: number;
|
|
26
|
+
droppedBadKind: number;
|
|
27
|
+
roles: number;
|
|
28
|
+
groups: number;
|
|
29
|
+
groupedModules: number;
|
|
30
|
+
droppedGroupUnresolved: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare function contributeFrameworkGraph(args: {
|
|
34
|
+
repoDir: string;
|
|
35
|
+
graph: NormalizedGraph;
|
|
36
|
+
cluster: ClusterResult;
|
|
37
|
+
}): Promise<FrameworkContributions>;
|
|
38
|
+
//# sourceMappingURL=contribute-step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribute-step.d.ts","sourceRoot":"","sources":["../../src/framework/contribute-step.ts"],"names":[],"mappings":"AAiEA,OAAO,EAA2B,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD,OAAO,KAAK,EAAqD,OAAO,EAAE,MAAM,YAAY,CAAC;AAE7F,MAAM,WAAW,sBAAsB;IACrC,wEAAwE;IACxE,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,8EAA8E;IAC9E,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B;;;;;OAKG;IACH,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvD,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,cAAc,EAAE,MAAM,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,cAAc,EAAE,MAAM,CAAC;QACvB,sBAAsB,EAAE,MAAM,CAAC;KAChC,CAAC;CACH;AAoBD,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,aAAa,CAAC;CACxB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAsUlC"}
|