Record listener provenance for framework-detected ports

Open
#232 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
22/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
build-system

Research direction

Begin with the #205 detect_framework result and has_exposed_ports, then the PCB008–PCB013 rules from #231/#122 to find where PCB010 is emitted. Agree on the provenance carrier (OCI label/annotation or out-of-band record), schema and version, then make validation read it and keep PCB010 for absent or malformed records. Done means Gradio, Streamlit and env-port fixtures pass with and without provenance, including override, explicit [] and bad-schema cases.

Written by the indexing model from the issue text.

Description

agent:needs-decision priority:p2 release:backlog squad:brokkr testing type:spike

Summary

#231 validates exposed ports against listeners it can read from the entrypoint argv. Gradio source listeners, environment-variable ports and shell wrappers cannot be read from OCI config, so they are reported as PCB010 (listener unknown) instead of being checked. The image config does not record the resolved listener (#205), and ExposedPorts may be a user override.

This issue tracks the remaining #122 scope: a reviewed contract that lets validation check those listeners.

Requirements

  • Record, at build time, where each listener port came from: detected default, explicit config, or source literal. Distinguish an explicit [] from defaults.
  • Choose and review the carrier (OCI label/annotation or an out-of-band build record), its name, schema and versioning. Do not invent labels without review.
  • Validation uses recorded provenance when present. Absent or malformed provenance stays PCB010; never guess.
  • Records hold no absolute paths, environment values or secrets.

Dependencies

  • #205 framework detection (detect_framework result and has_exposed_ports).
  • #231 / #122 validation rules PCB008–PCB013.

Tests

  • Gradio, Streamlit and env-port fixtures with and without provenance.
  • Override and explicit [] cases, plus malformed and unknown schema versions.
  • No change to images built without the feature.
Dominant language
Python
Stars
10
Forks
1
Avg merge
1d 19h
Merged PRs (30d)
129

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spboyer/pycontainer-build

All issues in spboyer/pycontainer-build

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.