Spaces:
Runtime error
Runtime error
Commit History
-
deploy: alembic 002 uses postgresql.ENUM
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>9d60926
-
deploy: presigned-URL upload endpoints
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>5c334b5 -
deploy: FileUploadError 400 by default
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>30ccb8a -
deploy: pick up IllegalStateChangeError fix from monorepo
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>4f5c4a8 -
fix(deploy): make alembic failure fatal so the error stops being silent
BIM Query Deploy +1: Claude Opus 4.7 (1M context)The 'alembic upgrade head || { WARNING; continue }' pattern hid the real migration failure behind a healthy-looking app that then 500'd on the first request with 'relation projects does not exist'. Now the container refuses to start without a clean migration, and the postgres.log tail is dumped to stderr to make the cause visible in the HF Space build log. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>035fe5e -
deploy: upload UnboundLocalError + session close race fix
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>a0e11c0 -
deploy: pick up JWKS/ES256 support from monorepo
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>0a556f1 -
deploy: pick up R2/health/alembic/celery fixes from monorepo
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>0917996 -
deploy: psycopg2 in requirements + redis SSL kwarg normalization
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Re-sync from monorepo carrying: - psycopg2-binary in requirements (needed by alembic env.py) - app/core/redis.py: strip Celery-style ssl_cert_reqs from the URL before handing it to redis-py, which only accepts the lowercase enum keys Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>bb2ecf2 -
deploy: pick up S3 endpoint_url fix from bim-suite
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Re-sync from monorepo carrying the fix in app/core/s3.py so the HF Space talks to R2 instead of silently falling back to AWS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>84408a7 -
fix(deploy): psycopg2 for alembic + supervisord runs as bim
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Two failures in the previous deploy: 1) 'No module named psycopg2' during 'alembic upgrade head'. alembic env.py uses the sync sqlalchemy engine; only asyncpg was installed. Add psycopg2-binary so migrations can connect. 2) 'Can't drop privilege as nonroot user' from supervisord. supervisord.conf had user=root, but the container runs as the bim user (uid 1000). setuid to root from non-root fails by design. Remove the user= line — supervisord just runs as whoever invoked it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>c3b39e3 -
fix(deploy): use unix socket for bootstrap psql (trust auth)
BIM Query Deploy +1: Claude Opus 4.7 (1M context)initdb sets --auth-local=trust + --auth-host=md5 and never writes a password for the postgres superuser, so TCP psql -h 127.0.0.1 fails with 'password authentication failed for user postgres'. The unix socket at /tmp uses local auth (trust), which is what we want for in-container bootstrap. The application itself still connects over TCP using the bim user (POSTGRES_HOST=localhost), and the bim role has a password set via CREATE ROLE during this bootstrap — that path keeps working. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>55f0196 -
fix(deploy): postgres startup robustness on HF Spaces
BIM Query Deploy +1: Claude Opus 4.7 (1M context)- Move unix socket to /tmp (default /var/run/postgresql is not writable for uid 1000 on HF Spaces). - Drop memory tunables: shared_buffers 256MB→64MB, work_mem 16MB→4MB, max_connections 50→20. /dev/shm in HF containers is typically ~64MB, which is what was almost certainly blocking startup. - huge_pages = off and dynamic_shared_memory_type = posix (explicit defaults that some restricted container runtimes override). - Surface postgres.log on pg_ctl failure so the next iteration gets a real error message instead of "Examine the log output". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>42d2a35 -
fix(deploy): create real user for uid 1000 so initdb works
BIM Query Deploy +1: Claude Opus 4.7 (1M context)HF Spaces enforce a non-root runtime as uid 1000, but the base image has no named user with that uid. Postgres initdb does getpwuid(geteuid()) and fails with 'could not look up effective user ID 1000' when the lookup returns nothing. Add explicit groupadd + useradd for a 'bim' user pinned to uid 1000, chown all writeable paths to it, set HOME=/home/bim, and switch the final USER directive from numeric 1000 to the named user. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>e19c339 -
Merge branch 'main' of https://huggingface.co/spaces/12mhsssss/bimquery-api
BIM Query Deploy# Conflicts: # README.md8bcb49f -
deploy: initial BIM Query API on Hugging Face Spaces
BIM Query Deploy +1: Claude Opus 4.7 (1M context)Containerised FastAPI + Celery worker/beat behind supervisord, with Postgres 15 + pgvector running in-container (started by entrypoint.sh, data ephemeral in /tmp/pgdata). External managed services configured via Space secrets: - Upstash Redis (broker + L2 cache) - Cloudflare R2 (S3-compatible IFC storage) - Groq (LLM intent classification) - Supabase (JWT verification only — auth happens in the frontend) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>e6be672 -
initial commit
Verified signature8b4b1ef